aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-03 22:07:21 +0800
committerobscuren <geffobscura@gmail.com>2014-07-03 22:07:21 +0800
commit8baa0f84e70aafa3882ec477d3b3d401d462958b (patch)
tree954a7a8dc9dac2e8235db5f17dc533ddcfc58974 /ethchain/state.go
parent5d6713920625b82df2b55728b2cbb9f7f3df2025 (diff)
downloadgo-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.go8
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) {