Defer undo on the current block's state

poc8
obscuren 11 years ago
parent 07c12f0b92
commit 066940f134
  1. 5
      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()

Loading…
Cancel
Save