core: simplify atomic store after writeBlockWithState #20798

This commit is contained in:
Daniel Liu 2025-04-18 19:38:44 +08:00 committed by Daniel Liu
parent 1d3e5cb455
commit 9a06e129b8

View file

@ -1766,11 +1766,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, []
// Write the block to the chain and get the status.
status, err := bc.writeBlockWithState(block, receipts, statedb, tradingState, lendingState)
t3 := time.Now()
atomic.StoreUint32(&followupInterrupt, 1)
if err != nil {
atomic.StoreUint32(&followupInterrupt, 1)
return it.index, events, coalescedLogs, err
}
atomic.StoreUint32(&followupInterrupt, 1)
// Update the metrics subsystem with all the measurements
accountReadTimer.Update(statedb.AccountReads)