mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 08:49:29 +00:00
eth/protocols/snap: move maxTrieRequestCount and batchSizeThreshold to sync_v1.go
This commit is contained in:
parent
e1809a1678
commit
83f32fbaa4
2 changed files with 9 additions and 9 deletions
|
|
@ -61,15 +61,6 @@ const (
|
|||
// size should be maxRequestSize / 24K. Assuming that most contracts do not
|
||||
// come close to that, requesting 4x should be a good approximation.
|
||||
maxCodeRequestCount = maxRequestSize / (24 * 1024) * 4
|
||||
|
||||
// maxTrieRequestCount is the maximum number of trie node blobs to request in
|
||||
// a single query. If this number is too low, we're not filling responses fully
|
||||
// and waste round trip times. If it's too high, we're capping responses and
|
||||
// waste bandwidth.
|
||||
maxTrieRequestCount = maxRequestSize / 512
|
||||
|
||||
// batchSizeThreshold is the maximum size allowed for gentrie batch.
|
||||
batchSizeThreshold = 8 * 1024 * 1024
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
|
|
@ -39,6 +39,15 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
// maxTrieRequestCount is the maximum number of trie node blobs to request in
|
||||
// a single query. If this number is too low, we're not filling responses fully
|
||||
// and waste round trip times. If it's too high, we're capping responses and
|
||||
// waste bandwidth.
|
||||
maxTrieRequestCount = maxRequestSize / 512
|
||||
|
||||
// batchSizeThreshold is the maximum size allowed for gentrie batch.
|
||||
batchSizeThreshold = 8 * 1024 * 1024
|
||||
|
||||
// trienodeHealRateMeasurementImpact is the impact a single measurement has on
|
||||
// the local node's trienode processing capacity. A value closer to 0 reacts
|
||||
// slower to sudden changes, but it is also more stable against temporary hiccups.
|
||||
|
|
|
|||
Loading…
Reference in a new issue