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

This commit is contained in:
ywzqwwt 2019-09-26 16:57:51 +08:00 committed by Martin Holst Swende
parent ad03d9801c
commit 1a6ef5ae58

View File

@ -1549,6 +1549,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, []
// Some other error occurred, abort
case err != nil:
bc.futureBlocks.Remove(block.Hash())
stats.ignored += len(it.chain)
bc.reportBlock(block, nil, err)
return it.index, events, coalescedLogs, err