zebrad: more reasonable concurrent block limit

This helps prevent overloading the network with too many concurrent
block requests.  On a fast network, we're likely to still have enough
room to saturate our bandwidth.  In the worst case, with 2MB blocks,
downloading 50 blocks concurrently is 100MB of queued downloads.  If we
need to download this in 20 seconds to avoid peer connection timeouts,
the implied worst-case minimum speed is 5MB/s.  In practice, this
minimum speed will likely be much lower.
This commit is contained in:
Henry de Valence 2020-11-13 10:52:39 -08:00
parent aa7538ab15
commit d2fc01755b
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ pub struct SyncSection {
impl Default for SyncSection {
fn default() -> Self {
Self {
max_concurrent_block_requests: 1_000,
max_concurrent_block_requests: 50,
lookahead_limit: 2_000,
}
}