mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 02:40:45 +00:00
Defer undo on the current block's state
This commit is contained in:
parent
07c12f0b92
commit
066940f134
1 changed files with 5 additions and 0 deletions
|
|
@ -103,6 +103,11 @@ func (bm *BlockManager) ProcessBlock(block *Block) error {
|
||||||
// Processing a blocks may never happen simultaneously
|
// Processing a blocks may never happen simultaneously
|
||||||
bm.mutex.Lock()
|
bm.mutex.Lock()
|
||||||
defer bm.mutex.Unlock()
|
defer bm.mutex.Unlock()
|
||||||
|
// Defer the Undo on the Trie. If the block processing happened
|
||||||
|
// we don't want to undo but since undo only happens on dirty
|
||||||
|
// nodes this won't happen because Commit would have been called
|
||||||
|
// before that.
|
||||||
|
defer bm.bc.CurrentBlock.State().Undo()
|
||||||
|
|
||||||
hash := block.Hash()
|
hash := block.Hash()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue