Commit 1a6ef5ae authored by ywzqwwt's avatar ywzqwwt Committed by Martin Holst Swende

core/blockchain: remove block from futureBlocks on error (#19763)

parent ad03d980
...@@ -1549,6 +1549,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, [] ...@@ -1549,6 +1549,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, []
// Some other error occurred, abort // Some other error occurred, abort
case err != nil: case err != nil:
bc.futureBlocks.Remove(block.Hash())
stats.ignored += len(it.chain) stats.ignored += len(it.chain)
bc.reportBlock(block, nil, err) bc.reportBlock(block, nil, err)
return it.index, events, coalescedLogs, err return it.index, events, coalescedLogs, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment