diff options
author | obscuren <geffobscura@gmail.com> | 2014-06-20 06:41:28 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-06-20 06:41:28 +0800 |
commit | 0b8ba1d55b6b4cdb63e0967790e34b1b499b638f (patch) | |
tree | c2bd979b3e32cf01862640f12fa365edfc0dcebd /ethchain/state.go | |
parent | 933aa63b7d302cff4287ba2814f3bd0f7744ed8e (diff) | |
download | go-tangerine-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar go-tangerine-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.gz go-tangerine-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.bz2 go-tangerine-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.lz go-tangerine-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.xz go-tangerine-0b8ba1d55b6b4cdb63e0967790e34b1b499b638f.tar.zst go-tangerine-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.go | 15 |
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) { |