aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/state.go')
-rw-r--r--ethchain/state.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/ethchain/state.go b/ethchain/state.go
index 616ab77e0..98fcb24db 100644
--- a/ethchain/state.go
+++ b/ethchain/state.go
@@ -78,11 +78,16 @@ func (s *State) EachStorage(cb ethutil.EachCallback) {
it.Each(cb)
}
+func (self *State) ResetStateObject(stateObject *StateObject) {
+ stateObject.state.Reset()
+
+ delete(self.stateObjects, string(stateObject.Address()))
+}
+
func (self *State) UpdateStateObject(stateObject *StateObject) {
addr := stateObject.Address()
if self.stateObjects[string(addr)] == nil {
- panic("?")
self.stateObjects[string(addr)] = stateObject
}