diff --git a/substrate/client/network/src/block_request_handler.rs b/substrate/client/network/src/block_request_handler.rs index bfc44e6460..332635dbe7 100644 --- a/substrate/client/network/src/block_request_handler.rs +++ b/substrate/client/network/src/block_request_handler.rs @@ -121,14 +121,9 @@ impl BlockRequestHandler { client: Arc>, num_peer_hint: usize, ) -> (Self, ProtocolConfig) { - // Rate of arrival multiplied with the waiting time in the queue equals the queue length. - // - // An average Polkadot node serves less than 5 requests per second. The 95th percentile - // serving a request is less than 2 second. Thus one would estimate the queue length to be - // below 10. - // - // Choosing 20 as the queue length to give some additional buffer. - let (tx, request_receiver) = mpsc::channel(20); + // Reserve enough request slots for one request per peer when we are at the maximum + // number of peers. + let (tx, request_receiver) = mpsc::channel(num_peer_hint); let mut protocol_config = generate_protocol_config(protocol_id); protocol_config.inbound_queue = Some(tx);