diff options
Diffstat (limited to 'state/statedb.go')
-rw-r--r-- | state/statedb.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/state/statedb.go b/state/statedb.go index 1231b4c1d..0a4156461 100644 --- a/state/statedb.go +++ b/state/statedb.go @@ -121,6 +121,7 @@ func (self *StateDB) Delete(addr []byte) bool { stateObject := self.GetOrNewStateObject(addr) if stateObject != nil { stateObject.MarkForDeletion() + stateObject.balance = new(big.Int) return true } @@ -128,6 +129,14 @@ func (self *StateDB) Delete(addr []byte) bool { return false } +func (self *StateDB) IsDeleted(addr []byte) bool { + stateObject := self.GetStateObject(addr) + if stateObject != nil { + return stateObject.remove + } + return false +} + // // Setting, updating & deleting state object methods // |