diff --git a/core/state/state_object.go b/core/state/state_object.go index 264dfd920d..b9a924fe9a 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -162,8 +162,12 @@ func (s *stateObject) getPrefetchedTrie() Trie { // GetState retrieves a value associated with the given storage key. func (s *stateObject) GetState(key common.Hash) common.Hash { - value, _ := s.getState(key) - return value + value, dirty := s.dirtyStorage[key] + if dirty { + return value + } + origin := s.GetCommittedState(key) + return origin } // getState retrieves a value associated with the given storage key, along with