diff --git a/core/blockchain.go b/core/blockchain.go index df7cd69f0e..6c0e9e9bd2 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -2661,7 +2661,7 @@ func (bc *BlockChain) insertChainStatelessParallel(chain types.Blocks, witnesses // Only commit blocks that don't need retry if !results[i].needsRetry { - if _, werr := bc.writeBlockAndSetHead(block, nil, nil, results[i].sdb, false, true); werr != nil { + if _, werr := bc.writeBlockAndSetHead(block, nil, nil, results[i].sdb, true, true); werr != nil { stopHeaders() return int(processed.Load()), werr } @@ -2691,7 +2691,7 @@ func (bc *BlockChain) insertChainStatelessParallel(chain types.Blocks, witnesses results[i].gasUsed = res.GasUsed // Commit the block after successful retry - if _, werr := bc.writeBlockAndSetHead(block, nil, nil, sdb, false, true); werr != nil { + if _, werr := bc.writeBlockAndSetHead(block, nil, nil, sdb, true, true); werr != nil { stopHeaders() return int(processed.Load()), werr } @@ -2797,7 +2797,7 @@ func (bc *BlockChain) insertChainStatelessSequential(chain types.Blocks, witness } } - if _, werr := bc.writeBlockAndSetHead(block, nil, nil, statedb, false, true); werr != nil { + if _, werr := bc.writeBlockAndSetHead(block, nil, nil, statedb, true, true); werr != nil { return int(processed.Load()), werr } processed.Add(1)