mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-02 01:23:45 +00:00
recorrect the fixing
This commit is contained in:
parent
d7d59ebb93
commit
8b3386c713
1 changed files with 5 additions and 1 deletions
|
|
@ -177,7 +177,11 @@ func newHandler(config *handlerConfig) (*handler, error) {
|
|||
}
|
||||
} else {
|
||||
head := h.chain.CurrentBlock()
|
||||
if head.Number.Uint64() > 0 && h.chain.HasState(head.Root) {
|
||||
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) {
|
||||
// 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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue