mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 00:13:46 +00:00
fix atomic followupInterrupt
This commit is contained in:
parent
9c00b1290b
commit
379b8d3423
1 changed files with 2 additions and 2 deletions
|
|
@ -1849,7 +1849,7 @@ func (bc *BlockChain) insertChain(chain types.Blocks, setHead bool) (int, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The traced section of block import.
|
// The traced section of block import.
|
||||||
err, stop, res := bc.processBlock(block, statedb, followupInterrupt, start, setHead)
|
err, stop, res := bc.processBlock(block, statedb, &followupInterrupt, start, setHead)
|
||||||
if err != nil || stop {
|
if err != nil || stop {
|
||||||
return it.index, err
|
return it.index, err
|
||||||
}
|
}
|
||||||
|
|
@ -1933,7 +1933,7 @@ type blockProcessingResult struct {
|
||||||
|
|
||||||
// processBlock executes and validates the given block. If there was no error
|
// processBlock executes and validates the given block. If there was no error
|
||||||
// it writes the block and associated state to database.
|
// it writes the block and associated state to database.
|
||||||
func (bc *BlockChain) processBlock(block *types.Block, statedb *state.StateDB, followupInterrupt atomic.Bool, start time.Time, setHead bool) (blockEndErr error, _ bool, _ *blockProcessingResult) {
|
func (bc *BlockChain) processBlock(block *types.Block, statedb *state.StateDB, followupInterrupt *atomic.Bool, start time.Time, setHead bool) (blockEndErr error, _ bool, _ *blockProcessingResult) {
|
||||||
if bc.logger != nil {
|
if bc.logger != nil {
|
||||||
td := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
td := bc.GetTd(block.ParentHash(), block.NumberU64()-1)
|
||||||
bc.logger.OnBlockStart(block, td, bc.CurrentFinalBlock(), bc.CurrentSafeBlock())
|
bc.logger.OnBlockStart(block, td, bc.CurrentFinalBlock(), bc.CurrentSafeBlock())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue