From 8baa0f84e70aafa3882ec477d3b3d401d462958b Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 3 Jul 2014 16:07:21 +0200 Subject: Fixed reverting error --- ethchain/state.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'ethchain/state.go') 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) { -- cgit v1.2.3