aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-20 06:41:28 +0800
committerobscuren <geffobscura@gmail.com>2014-06-20 06:41:28 +0800
commit0b8ba1d55b6b4cdb63e0967790e34b1b499b638f (patch)
treec2bd979b3e32cf01862640f12fa365edfc0dcebd /ethchain/state.go
parent933aa63b7d302cff4287ba2814f3bd0f7744ed8e (diff)
downloaddexon-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.gz
dexon-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.zst
dexon-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.zip
Renamed snapshot to copy/set and added it back to the VM
Diffstat (limited to 'ethchain/state.go')
-rw-r--r--ethchain/state.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/ethchain/state.go b/ethchain/state.go
index 98fcb24db..a08dfac83 100644
--- a/ethchain/state.go
+++ b/ethchain/state.go
@@ -79,9 +79,9 @@ func (s *State) EachStorage(cb ethutil.EachCallback) {
}
func (self *State) ResetStateObject(stateObject *StateObject) {
- stateObject.state.Reset()
-
delete(self.stateObjects, string(stateObject.Address()))
+
+ stateObject.state.Reset()
}
func (self *State) UpdateStateObject(stateObject *StateObject) {
@@ -154,13 +154,10 @@ func (self *State) Copy() *State {
return nil
}
-func (s *State) Snapshot() *State {
- return s.Copy()
-}
-
-func (s *State) Revert(snapshot *State) {
- s.trie = snapshot.trie
- s.stateObjects = snapshot.stateObjects
+func (self *State) Set(state *State) {
+ //s.trie = snapshot.trie
+ //s.stateObjects = snapshot.stateObjects
+ self = state
}
func (s *State) Put(key, object []byte) {