aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/block_manager.go')
-rw-r--r--ethchain/block_manager.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/ethchain/block_manager.go b/ethchain/block_manager.go
index 8b237a29a..d9cdcd2d9 100644
--- a/ethchain/block_manager.go
+++ b/ethchain/block_manager.go
@@ -103,6 +103,11 @@ func (bm *BlockManager) ProcessBlock(block *Block) error {
// Processing a blocks may never happen simultaneously
bm.mutex.Lock()
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()