mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
parent
75fe9c6c84
commit
173a26f0c3
1 changed files with 3 additions and 3 deletions
|
|
@ -936,9 +936,6 @@ func (s *StateDB) getStateObject(addr common.Address) *stateObject {
|
||||||
// destructed object instead of wiping all knowledge about the state object.
|
// destructed object instead of wiping all knowledge about the state object.
|
||||||
func (s *StateDB) getDeletedStateObject(addr common.Address) *stateObject {
|
func (s *StateDB) getDeletedStateObject(addr common.Address) *stateObject {
|
||||||
return MVRead(s, blockstm.NewAddressKey(addr), nil, func(s *StateDB) *stateObject {
|
return MVRead(s, blockstm.NewAddressKey(addr), nil, func(s *StateDB) *stateObject {
|
||||||
s.stateObjectsMu.Lock()
|
|
||||||
defer s.stateObjectsMu.Unlock()
|
|
||||||
|
|
||||||
// Prefer live objects if any is available
|
// Prefer live objects if any is available
|
||||||
if obj := s.stateObjects[addr]; obj != nil {
|
if obj := s.stateObjects[addr]; obj != nil {
|
||||||
return obj
|
return obj
|
||||||
|
|
@ -1003,6 +1000,9 @@ func (s *StateDB) getDeletedStateObject(addr common.Address) *stateObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StateDB) setStateObject(object *stateObject) {
|
func (s *StateDB) setStateObject(object *stateObject) {
|
||||||
|
s.stateObjectsMu.Lock()
|
||||||
|
defer s.stateObjectsMu.Unlock()
|
||||||
|
|
||||||
s.stateObjects[object.Address()] = object
|
s.stateObjects[object.Address()] = object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue