mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
core: don't crit on rewind during sync
This commit is contained in:
parent
d2176f463b
commit
74d67469dc
1 changed files with 2 additions and 1 deletions
|
|
@ -782,7 +782,8 @@ func (bc *BlockChain) rewindPathHead(head *types.Header, root common.Hash) (*typ
|
||||||
// Recover if the target state if it's not available yet.
|
// Recover if the target state if it's not available yet.
|
||||||
if !bc.HasState(head.Root) {
|
if !bc.HasState(head.Root) {
|
||||||
if err := bc.triedb.Recover(head.Root); err != nil {
|
if err := bc.triedb.Recover(head.Root); err != nil {
|
||||||
log.Crit("Failed to rollback state", "err", err)
|
log.Error("Failed to rollback state, resetting to genesis", "err", err)
|
||||||
|
return bc.genesisBlock.Header(), rootNumber
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info("Rewound to block with state", "number", head.Number, "hash", head.Hash())
|
log.Info("Rewound to block with state", "number", head.Number, "hash", head.Hash())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue