mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Merge pull request #336 from gzliudan/fix-func-procFutureBlocks
Fix a loop closure bug in func procFutureBlocks
This commit is contained in:
commit
87ba815341
1 changed files with 2 additions and 1 deletions
|
|
@ -987,8 +987,9 @@ func (bc *BlockChain) procFutureBlocks() {
|
|||
if i == len(blocks)-1 && err == nil {
|
||||
engine, ok := bc.Engine().(*XDPoS.XDPoS)
|
||||
if ok {
|
||||
j := i
|
||||
go func() {
|
||||
header := blocks[i].Header()
|
||||
header := blocks[j].Header()
|
||||
err = engine.HandleProposedBlock(bc, header)
|
||||
if err != nil {
|
||||
log.Info("[procFutureBlocks] handle proposed block has error", "err", err, "block hash", header.Hash(), "number", header.Number)
|
||||
|
|
|
|||
Loading…
Reference in a new issue