mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
Fix stale statistics eviction condition
This commit is contained in:
parent
c974722dc0
commit
69422b9dac
1 changed files with 1 additions and 1 deletions
|
|
@ -346,7 +346,7 @@ func (t *SizeTracker) run() {
|
|||
|
||||
// Evict the stale statistics
|
||||
heap.Push(&h, stats[u.root])
|
||||
for u.blockNumber-h[0].BlockNumber > statEvictThreshold {
|
||||
for len(h) > 0 && u.blockNumber-h[0].BlockNumber > statEvictThreshold {
|
||||
delete(stats, h[0].StateRoot)
|
||||
heap.Pop(&h)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue