diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-05-13 03:47:09 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2017-05-18 15:05:58 +0800 |
commit | e7119ce12d86634dd487ab3c55bf9b98f327236c (patch) | |
tree | 8cbcab0d486999e4882f6d7a340e3b2dae562376 /core/state/statedb.go | |
parent | a5f6a1cb7c5e5dde130391e9bed7625ef9ff36b5 (diff) | |
download | dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.tar dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.tar.gz dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.tar.bz2 dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.tar.lz dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.tar.xz dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.tar.zst dexon-e7119ce12d86634dd487ab3c55bf9b98f327236c.zip |
core/state: fixed (self)destructed objects
Add the object to the list of destructed objects during a selfdestruct /
suicide operation and also remove it from the list once the journal
reverts.
Diffstat (limited to 'core/state/statedb.go')
-rw-r--r-- | core/state/statedb.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go index 8e4ba21c0..05869a0c8 100644 --- a/core/state/statedb.go +++ b/core/state/statedb.go @@ -378,6 +378,8 @@ func (self *StateDB) Suicide(addr common.Address) bool { }) stateObject.markSuicided() stateObject.data.Balance = new(big.Int) + self.stateObjectsDestructed[addr] = struct{}{} + return true } |