mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
fix compile error
This commit is contained in:
parent
c8f9d6bb90
commit
2fd06148ba
1 changed files with 2 additions and 1 deletions
|
|
@ -375,10 +375,11 @@ func (q *queue) Results(block bool) []*fetchResult {
|
|||
|
||||
results := q.resultCache.GetCompleted(maxResultsProcess)
|
||||
|
||||
var throttleThreshold uint64
|
||||
if len(results) > 0 {
|
||||
// set a throttle threshhold based on estimated worst-sized block that can be created for a given gas limit.
|
||||
gasLimit := max(results[0].Header.GasLimit, 10)
|
||||
throttleThreshold := min(uint64(blockCacheMemory)/(gasLimit/10), 2048)
|
||||
throttleThreshold = min(uint64(blockCacheMemory)/(gasLimit/10), 2048)
|
||||
throttleThreshold = q.resultCache.SetThrottleThreshold(throttleThreshold)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue