all: refactor trie API (#26995)
In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned. The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.
This commit is contained in:
@@ -364,7 +364,7 @@ func getAccount(triedb *trie.Database, root, hash common.Hash) (types.StateAccou
|
||||
if err != nil {
|
||||
return types.StateAccount{}, err
|
||||
}
|
||||
blob, err := trie.TryGet(hash[:])
|
||||
blob, err := trie.Get(hash[:])
|
||||
if err != nil {
|
||||
return types.StateAccount{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user