requestBandwidth
fun requestBandwidth(peer: BandwidthSocket, blk: Int, priority: Int, chans: List<BandwidthChannel>): Int
Requests blk bytes for peer across the given chans, at priority (1 = normal). Faithful to bandwidth_manager::request_bandwidth:
returns blk immediately if the manager is not aborted and either there are no channels (unmetered) or none of the channels BandwidthChannel.needQueueing (enough quota was already held, and has been withdrawn for it);
otherwise enqueues the request and returns 0, signalling that the peer's BandwidthSocket.assignBandwidth will be called from a later updateQuotas.
A return of 0 while aborting means the manager is shutting down and nothing will be assigned.