Skip to content

Commit a75c061

Browse files
authored
core/blockchain: simplify atomic store after writeBlockWithState (#20798)
Signed-off-by: meows <b5c6@protonmail.com>
1 parent 613af7c commit a75c061

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎core/blockchain.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,11 +1740,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er
17401740
// Write the block to the chain and get the status.
17411741
substart = time.Now()
17421742
status, err := bc.writeBlockWithState(block, receipts, logs, statedb, false)
1743+
atomic.StoreUint32(&followupInterrupt, 1)
17431744
if err != nil {
1744-
atomic.StoreUint32(&followupInterrupt, 1)
17451745
return it.index, err
17461746
}
1747-
atomic.StoreUint32(&followupInterrupt, 1)
17481747

17491748
// Update the metrics touched during block commit
17501749
accountCommitTimer.Update(statedb.AccountCommits) // Account commits are complete, we can mark them

0 commit comments

Comments
 (0)