From 5f9bf92f34ec8378cb53a9ee846abb0aeca2f3d6 Mon Sep 17 00:00:00 2001 From: Jonathan Oppenheimer Date: Mon, 12 Jan 2026 15:32:34 -0500 Subject: [PATCH] fix: remove avalanchego optimization --- core/state/snapshot/disklayer.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/core/state/snapshot/disklayer.go b/core/state/snapshot/disklayer.go index 2a7ef75841..3a5864f117 100644 --- a/core/state/snapshot/disklayer.go +++ b/core/state/snapshot/disklayer.go @@ -19,7 +19,6 @@ package snapshot import ( "bytes" "sync" - "time" "github.com/VictoriaMetrics/fastcache" "github.com/ethereum/go-ethereum/common" @@ -49,8 +48,7 @@ type diskLayer struct { done chan struct{} cancelOnce sync.Once - genStats *generatorStats // Stats for snapshot generation (generation aborted/finished if non-nil) - abortStarted time.Time // Timestamp when abort was first requested + genStats *generatorStats // Stats for snapshot generation (generation aborted/finished if non-nil) lock sync.RWMutex } @@ -217,14 +215,6 @@ func (dl *diskLayer) stopGeneration() { return } - // Store ideal time for abort to get better estimate of load - // - // Note that we set this time regardless if abortion was skipped otherwise we - // will never restart generation (age will always be negative). - if dl.abortStarted.IsZero() { - dl.abortStarted = time.Now() - } - dl.cancelOnce.Do(func() { close(cancel) })