mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
actually fix it this time..........
This commit is contained in:
parent
7f0adc0bcb
commit
b9fd23ae62
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ func (r *resultStore) getFetchResult(headerNumber uint64) (item *fetchResult, in
|
||||||
// estimate an average block size based on the worst case:
|
// estimate an average block size based on the worst case:
|
||||||
// a block filled with calldata containing all zeroes
|
// a block filled with calldata containing all zeroes
|
||||||
// costing ~10 gas per byte of calldata.
|
// costing ~10 gas per byte of calldata.
|
||||||
avgEstimatedBlockSize := min((r.itemsGasUsed/(uint64(index)+1))/10, 524)
|
avgEstimatedBlockSize := max((r.itemsGasUsed/(uint64(index)+1))/10, 524)
|
||||||
|
|
||||||
throttleThreshold := min(uint64(len(r.items)), uint64(blockCacheMemory)/avgEstimatedBlockSize)
|
throttleThreshold := min(uint64(len(r.items)), uint64(blockCacheMemory)/avgEstimatedBlockSize)
|
||||||
throttle = index >= int(throttleThreshold)
|
throttle = index >= int(throttleThreshold)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue