Browse Source

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

ywzqwwt 6 years ago
parent
commit
1a6ef5ae58
1 changed files with 1 additions and 0 deletions
  1. 1 0
      core/blockchain.go

+ 1 - 0
core/blockchain.go

@@ -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