Update state_sizer.go

This commit is contained in:
marukai67 2026-02-14 18:39:27 +01:00 committed by GitHub
parent ad88b68a46
commit d1301cb1ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -346,7 +346,7 @@ func (t *SizeTracker) run() {
// Evict the stale statistics
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)
heap.Pop(&h)
}