diff options
author | obscuren <geffobscura@gmail.com> | 2014-07-03 22:07:21 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-07-03 22:07:21 +0800 |
commit | 8baa0f84e70aafa3882ec477d3b3d401d462958b (patch) | |
tree | 954a7a8dc9dac2e8235db5f17dc533ddcfc58974 /ethchain/state.go | |
parent | 5d6713920625b82df2b55728b2cbb9f7f3df2025 (diff) | |
download | go-tangerine-8baa0f84e70aafa3882ec477d3b3d401d462958b.tar.gz go-tangerine-8baa0f84e70aafa3882ec477d3b3d401d462958b.tar.zst go-tangerine-8baa0f84e70aafa3882ec477d3b3d401d462958b.zip |
Fixed reverting error
Diffstat (limited to 'ethchain/state.go')
-rw-r--r-- | ethchain/state.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ethchain/state.go b/ethchain/state.go index 7ddf7916f..20af94fe8 100644 --- a/ethchain/state.go +++ b/ethchain/state.go @@ -157,9 +157,11 @@ func (self *State) Copy() *State { } func (self *State) Set(state *State) { - //s.trie = snapshot.trie - //s.stateObjects = snapshot.stateObjects - self = state + if state == nil { + panic("Tried setting 'state' to nil through 'Set'") + } + + *self = *state } func (s *State) Put(key, object []byte) { |