mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-11 10:36:37 +00:00
core/rawdb: fix misleading comment in HasTrieNode (#32599)
This commit is contained in:
parent
a3062390f7
commit
c2fcc27132
1 changed files with 2 additions and 2 deletions
|
|
@ -150,7 +150,7 @@ func HasTrieNode(db ethdb.KeyValueReader, owner common.Hash, path []byte, hash c
|
||||||
if len(blob) == 0 {
|
if len(blob) == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return crypto.Keccak256Hash(blob) == hash // exists but not match
|
return crypto.Keccak256Hash(blob) == hash // exist and match
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("Unknown scheme %v", scheme))
|
panic(fmt.Sprintf("Unknown scheme %v", scheme))
|
||||||
}
|
}
|
||||||
|
|
@ -173,7 +173,7 @@ func ReadTrieNode(db ethdb.KeyValueReader, owner common.Hash, path []byte, hash
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if crypto.Keccak256Hash(blob) != hash {
|
if crypto.Keccak256Hash(blob) != hash {
|
||||||
return nil // exists but not match
|
return nil // exist but not match
|
||||||
}
|
}
|
||||||
return blob
|
return blob
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue