aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state.go
diff options
context:
space:
mode:
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) {