eth/downloader: change intial download size (#21366)
This changes how the downloader works, a little bit. Previously, when block sync started, we immediately started filling up to 8192 blocks. Usually this is fine, blocks are small in the early numbers. The threshold then is lowered as we measure the size of the blocks that are filled. However, if the node is shut down and restarts syncing while we're in a heavy segment, that might be bad. This PR introduces a more conservative initial threshold of 2K blocks instead.
This commit is contained in:
committed by
GitHub
parent
d90bbce954
commit
3010f9fc75
@ -39,7 +39,7 @@ var (
|
||||
)
|
||||
|
||||
// The common prefix of all test chains:
|
||||
var testChainBase = newTestChain(blockCacheItems+200, testGenesis)
|
||||
var testChainBase = newTestChain(blockCacheMaxItems+200, testGenesis)
|
||||
|
||||
// Different forks on top of the base chain:
|
||||
var testChainForkLightA, testChainForkLightB, testChainForkHeavy *testChain
|
||||
|
Reference in New Issue
Block a user