diff options
Diffstat (limited to 'core/state/journal.go')
-rw-r--r-- | core/state/journal.go | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/state/journal.go b/core/state/journal.go index 720c821b9..d1e73e7d0 100644 --- a/core/state/journal.go +++ b/core/state/journal.go @@ -67,10 +67,13 @@ type ( addLogChange struct { txhash common.Hash } + touchChange struct { + account *common.Address + prev bool + } ) func (ch createObjectChange) undo(s *StateDB) { - s.GetStateObject(*ch.account).deleted = true delete(s.stateObjects, *ch.account) delete(s.stateObjectsDirty, *ch.account) } @@ -87,6 +90,15 @@ func (ch suicideChange) undo(s *StateDB) { } } +var ripemd = common.HexToAddress("0000000000000000000000000000000000000003") + +func (ch touchChange) undo(s *StateDB) { + if !ch.prev && *ch.account != ripemd { + delete(s.stateObjects, *ch.account) + delete(s.stateObjectsDirty, *ch.account) + } +} + func (ch balanceChange) undo(s *StateDB) { s.GetStateObject(*ch.account).setBalance(ch.prev) } |