trie, core, eth: use db.has over db.get where possible

This commit is contained in:
Martin Holst Swende
2021-12-15 16:16:45 +01:00
parent fc01a7ce8e
commit 893502e561
4 changed files with 20 additions and 8 deletions

View File

@ -418,8 +418,7 @@ func traverseRawState(ctx *cli.Context) error {
// Check the present for non-empty hash node(embedded node doesn't
// have their own hash).
if node != (common.Hash{}) {
blob := rawdb.ReadTrieNode(chaindb, node)
if len(blob) == 0 {
if !rawdb.HasTrieNode(chaindb, node) {
log.Error("Missing trie node(storage)", "hash", node)
return errors.New("missing storage")
}