good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 69c1f2c2 authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

core: force import known but rolled back blocks

parent 52ad848b
No related branches found
No related tags found
No related merge requests found
...@@ -1070,8 +1070,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty ...@@ -1070,8 +1070,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty
} }
switch { switch {
case err == ErrKnownBlock: case err == ErrKnownBlock:
stats.ignored++ // Block and state both already known. However if the current block is below
continue // this number we did a rollback and we should reimport it nonetheless.
if bc.CurrentBlock().NumberU64() >= block.NumberU64() {
stats.ignored++
continue
}
case err == consensus.ErrFutureBlock: case err == consensus.ErrFutureBlock:
// Allow up to MaxFuture second in the future blocks. If this limit is exceeded // Allow up to MaxFuture second in the future blocks. If this limit is exceeded
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment