mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-01 22:02:55 +00:00
fix: remove avalanchego optimization
This commit is contained in:
parent
75905dd04b
commit
5f9bf92f34
1 changed files with 1 additions and 11 deletions
|
|
@ -19,7 +19,6 @@ package snapshot
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/VictoriaMetrics/fastcache"
|
"github.com/VictoriaMetrics/fastcache"
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
|
@ -49,8 +48,7 @@ type diskLayer struct {
|
||||||
done chan struct{}
|
done chan struct{}
|
||||||
cancelOnce sync.Once
|
cancelOnce sync.Once
|
||||||
|
|
||||||
genStats *generatorStats // Stats for snapshot generation (generation aborted/finished if non-nil)
|
genStats *generatorStats // Stats for snapshot generation (generation aborted/finished if non-nil)
|
||||||
abortStarted time.Time // Timestamp when abort was first requested
|
|
||||||
|
|
||||||
lock sync.RWMutex
|
lock sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
@ -217,14 +215,6 @@ func (dl *diskLayer) stopGeneration() {
|
||||||
return
|
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() {
|
dl.cancelOnce.Do(func() {
|
||||||
close(cancel)
|
close(cancel)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue