diff options
Diffstat (limited to 'ethstate')
-rw-r--r-- | ethstate/state.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ethstate/state.go b/ethstate/state.go index 23b106e34..c2486849b 100644 --- a/ethstate/state.go +++ b/ethstate/state.go @@ -94,11 +94,15 @@ func (self *State) GetStateObject(addr []byte) *StateObject { } stateObject = NewStateObjectFromBytes(addr, []byte(data)) - self.stateObjects[string(addr)] = stateObject + self.SetStateObject(stateObject) return stateObject } +func (self *State) SetStateObject(object *StateObject) { + self.stateObjects[string(object.address)] = object +} + // Retrieve a state object or create a new state object if nil func (self *State) GetOrNewStateObject(addr []byte) *StateObject { stateObject := self.GetStateObject(addr) |