triedb/pathdb: do not need to check flag just return it

This commit is contained in:
cuiweixie 2026-01-17 17:05:20 +08:00
parent 127d1f42bb
commit 1decec765a
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -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.
func (s *stateSet) account(hash common.Hash) ([]byte, bool) {
// If the account is known locally, return it
if data, ok := s.accountData[hash]; ok {
return data, true
}
return nil, false // account is unknown in this set
data, ok := s.accountData[hash]
return data, ok
}
// mustAccount returns the account data associated with the specified address