Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
problem: bad fit for scoped conditional value
Browse files Browse the repository at this point in the history
  • Loading branch information
whilei committed Jun 4, 2018
1 parent b059469 commit 476a39f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,14 @@ func (self *StateDB) deleteStateObject(stateObject *StateObject) {
func (self *StateDB) getStateObject(addr common.Address) (stateObject *StateObject) {
// Prefer 'live' objects.
self.lock.Lock()
if obj := self.stateObjects[addr]; obj != nil {
self.lock.Unlock()
obj := self.stateObjects[addr]
self.lock.Unlock()
if obj != nil {
if obj.deleted {
return nil
}
return obj
}
self.lock.Unlock()

// Load the object from the database.
enc, err := self.trie.TryGet(addr[:])
Expand All @@ -371,7 +371,7 @@ func (self *StateDB) getStateObject(addr common.Address) (stateObject *StateObje
return nil
}
// Insert into the live set.
obj := newObject(self, addr, data, self.MarkStateObjectDirty)
obj = newObject(self, addr, data, self.MarkStateObjectDirty)
self.setStateObject(obj)
return obj
}
Expand Down

0 comments on commit 476a39f

Please sign in to comment.