mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-18 12:51:39 +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.
|
// GetState retrieves a value associated with the given storage key.
|
||||||
func (s *stateObject) GetState(key common.Hash) common.Hash {
|
func (s *stateObject) GetState(key common.Hash) common.Hash {
|
||||||
value, _ := s.getState(key)
|
value, dirty := s.dirtyStorage[key]
|
||||||
return value
|
if dirty {
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
return s.GetCommittedState(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
// getState retrieves a value associated with the given storage key, along with
|
// getState retrieves a value associated with the given storage key, along with
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue