Revert " recorrect the fixing"

This reverts commit 093f63c608a667e9503d302c3518ff2f3f14d3b1.
This commit is contained in:
Monkey 2025-05-19 20:04:13 +08:00 committed by Guillaume Ballet
parent 8b3386c713
commit 9645d9b1d6

View file

@ -177,11 +177,7 @@ func newHandler(config *handlerConfig) (*handler, error) {
}
} else {
head := h.chain.CurrentBlock()
if head.Number.Uint64() == 0 && head.Time > uint64(time.Now().Unix()) {
// Print warning log if the genesis block is in the future.
h.snapSync.Store(false)
log.Warn("Switch sync mode from snap sync to full sync", "reason", "in the future genesis block")
} else if head.Number.Uint64() > 0 && h.chain.HasState(head.Root) {
if head.Number.Uint64() > 0 && h.chain.HasState(head.Root) {
// Print warning log if database is not empty to run snap sync.
log.Warn("Switch sync mode from snap sync to full sync", "reason", "snap sync complete")
} else {