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