Unverified Commit a75c0610 authored by meowsbits's avatar meowsbits Committed by GitHub

core/blockchain: simplify atomic store after writeBlockWithState (#20798)

Signed-off-by: 's avatarmeows <b5c6@protonmail.com>
parent 613af7ce
...@@ -1740,11 +1740,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er ...@@ -1740,11 +1740,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals bool) (int, er
// Write the block to the chain and get the status. // Write the block to the chain and get the status.
substart = time.Now() substart = time.Now()
status, err := bc.writeBlockWithState(block, receipts, logs, statedb, false) status, err := bc.writeBlockWithState(block, receipts, logs, statedb, false)
atomic.StoreUint32(&followupInterrupt, 1)
if err != nil { if err != nil {
atomic.StoreUint32(&followupInterrupt, 1)
return it.index, err return it.index, err
} }
atomic.StoreUint32(&followupInterrupt, 1)
// Update the metrics touched during block commit // Update the metrics touched during block commit
accountCommitTimer.Update(statedb.AccountCommits) // Account commits are complete, we can mark them accountCommitTimer.Update(statedb.AccountCommits) // Account commits are complete, we can mark them
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment