Merge pull request #24117 from holiman/db_has

trie, core, eth: use db.has over db.get where possible
This commit is contained in:
Péter Szilágyi
2022-01-06 11:30:11 +02:00
committed by GitHub
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")
}