diff options
Diffstat (limited to 'core/state/journal.go')
-rw-r--r-- | core/state/journal.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/state/journal.go b/core/state/journal.go index 5cd41477d..73218dd28 100644 --- a/core/state/journal.go +++ b/core/state/journal.go @@ -73,6 +73,7 @@ type ( touchChange struct { account *common.Address prev bool + prevDirty bool } ) @@ -97,8 +98,10 @@ 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) + s.getStateObject(*ch.account).touched = ch.prev + if !ch.prevDirty { + delete(s.stateObjectsDirty, *ch.account) + } } } |