Renamed snapshot to copy/set and added it back to the VM

This commit is contained in:
obscuren
2014-06-20 00:41:28 +02:00
parent 933aa63b7d
commit 0b8ba1d55b
2 changed files with 28 additions and 26 deletions

View File

@ -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) {