core/rawdb: address martin's comment

This commit is contained in:
Gary Rong 2024-03-05 10:17:58 +08:00
parent adc4b72c7e
commit 504f36d68b

View file

@ -191,6 +191,9 @@ func ReadTrieNode(db ethdb.KeyValueReader, owner common.Hash, path []byte, hash
} else { } else {
blob = ReadStorageTrieNode(db, owner, path) blob = ReadStorageTrieNode(db, owner, path)
} }
if len(blob) == 0 {
return nil
}
h := newHasher() h := newHasher()
defer h.release() defer h.release()
if h.hash(blob) != hash { if h.hash(blob) != hash {