Increase the peerset request buffer size.

tower-buffer uses tokio's mpsc channels, not the futures-rs mpsc channels.
Unlike futures-rs mpsc channels, which have capacity n+m, where n is the buffer
size and m is the number of senders, tokio channels always have buffer size n.
This means that the buffer size is shared across all peer set handles.

Thanks to @hawkw for sharing details of the Tokio internals!
This commit is contained in:
Henry de Valence 2020-02-19 10:03:06 -08:00 committed by Deirdre Connolly
parent 5f07a25b05
commit 94fe2c3b57
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ impl Default for Config {
initial_testnet_peers: testnet_peers,
ewma_default_rtt: Duration::from_secs(1),
ewma_decay_time: Duration::from_secs(60),
peerset_request_buffer_size: 1,
peerset_request_buffer_size: 10,
handshake_timeout: Duration::from_secs(4),
new_peer_interval: Duration::from_secs(60),
peerset_initial_target_size: 50,