mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: fix rewinding in path
This commit is contained in:
parent
470916de46
commit
c6b0eb75fa
1 changed files with 2 additions and 2 deletions
|
|
@ -739,8 +739,8 @@ func (bc *BlockChain) rewindPathHead(root common.Hash) (*types.Header, uint64) {
|
|||
headBlock = bc.GetHeader(headBlock.ParentHash, headBlock.Number.Uint64()-1) // Keep rewinding
|
||||
}
|
||||
// Recover if the target state if it's not available yet.
|
||||
if !bc.HasState(root) {
|
||||
if err := bc.triedb.Recover(root); err != nil {
|
||||
if !bc.HasState(headBlock.Root) {
|
||||
if err := bc.triedb.Recover(headBlock.Root); err != nil {
|
||||
log.Crit("Failed to rollback state", "err", err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue