Parcourir la source

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

ywzqwwt il y a 6 ans
Parent
commit
1a6ef5ae58
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  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