Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Guillaume Ballet 2026-04-20 13:27:39 +02:00 committed by GitHub
parent cb15100422
commit 138993e926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -246,7 +246,7 @@ func (r *mptTrieReader) Storage(addr common.Address, key common.Hash) (common.Ha
// //
// ubtTrieReader is safe for concurrent read. // ubtTrieReader is safe for concurrent read.
type ubtTrieReader struct { type ubtTrieReader struct {
root common.Hash // State root which uniquely represent a state root common.Hash // State root which uniquely represents a state
db *triedb.Database // Database for loading trie db *triedb.Database // Database for loading trie
tr Trie // Referenced unified binary trie tr Trie // Referenced unified binary trie
lock sync.Mutex // Lock for protecting concurrent read lock sync.Mutex // Lock for protecting concurrent read
@ -297,7 +297,7 @@ func newUBTTrieReader(root common.Hash, db *triedb.Database) (*ubtTrieReader, er
// Account implements StateReader, retrieving the account specified by the address. // Account implements StateReader, retrieving the account specified by the address.
// //
// An error will be returned if the trie state is corrupted. An nil account // An error will be returned if the trie state is corrupted. A nil account
// will be returned if it's not existent in the trie. // will be returned if it's not existent in the trie.
func (r *ubtTrieReader) Account(addr common.Address) (*types.StateAccount, error) { func (r *ubtTrieReader) Account(addr common.Address) (*types.StateAccount, error) {
r.lock.Lock() r.lock.Lock()