mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
triedb/pathdb: do not need to check flag just return it
This commit is contained in:
parent
127d1f42bb
commit
1decec765a
1 changed files with 2 additions and 4 deletions
|
|
@ -97,10 +97,8 @@ func newStates(accounts map[common.Hash][]byte, storages map[common.Hash]map[com
|
||||||
// account returns the account data associated with the specified address hash.
|
// account returns the account data associated with the specified address hash.
|
||||||
func (s *stateSet) account(hash common.Hash) ([]byte, bool) {
|
func (s *stateSet) account(hash common.Hash) ([]byte, bool) {
|
||||||
// If the account is known locally, return it
|
// If the account is known locally, return it
|
||||||
if data, ok := s.accountData[hash]; ok {
|
data, ok := s.accountData[hash]
|
||||||
return data, true
|
return data, ok
|
||||||
}
|
|
||||||
return nil, false // account is unknown in this set
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// mustAccount returns the account data associated with the specified address
|
// mustAccount returns the account data associated with the specified address
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue