fix: remove avalanchego optimization

This commit is contained in:
Jonathan Oppenheimer 2026-01-12 15:32:34 -05:00
parent 75905dd04b
commit 5f9bf92f34
No known key found for this signature in database
GPG key ID: E4CEF9010EB8B740

View file

@ -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)
})