triedb/pathdb: print out all trie owner and hash information

This commit is contained in:
Gary Rong 2024-07-22 10:42:47 +08:00
parent df3f0a81a7
commit 791094d4c0

View file

@ -78,7 +78,7 @@ func (r *reader) Node(owner common.Hash, path []byte, hash common.Hash) ([]byte,
if len(blob) > 0 { if len(blob) > 0 {
blobHex = hexutil.Encode(blob) blobHex = hexutil.Encode(blob)
} }
log.Error("Unexpected trie node", "location", loc.loc, "owner", owner, "path", path, "expect", hash, "got", got, "blob", blobHex) log.Error("Unexpected trie node", "location", loc.loc, "owner", owner.Hex(), "path", path, "expect", hash.Hex(), "got", got.Hex(), "blob", blobHex)
return nil, fmt.Errorf("unexpected node: (%x %v), %x!=%x, %s, blob: %s", owner, path, hash, got, loc.string(), blobHex) return nil, fmt.Errorf("unexpected node: (%x %v), %x!=%x, %s, blob: %s", owner, path, hash, got, loc.string(), blobHex)
} }
return blob, nil return blob, nil