mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-13 02:11:34 +00:00
core/state: opt stateObject.GetState (#34825)
This commit is contained in:
parent
b5d9c8d1c2
commit
0c0d299c52
1 changed files with 5 additions and 2 deletions
|
|
@ -162,8 +162,11 @@ 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
|
||||
}
|
||||
return s.GetCommittedState(key)
|
||||
}
|
||||
|
||||
// getState retrieves a value associated with the given storage key, along with
|
||||
|
|
|
|||
Loading…
Reference in a new issue