mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-07-24 10:33:16 +00:00
fix: Merkle tree proof length check (#1432)
This commit is contained in:
parent
c4a92b3d11
commit
aee1398836
@ -65,7 +65,7 @@ func verify*(self: StorageMerkleProof, leaf: MultiHash, root: MultiHash): ?!bool
|
||||
if self.mcodec != root.mcodec or self.mcodec != leaf.mcodec:
|
||||
return failure "Hash codec mismatch"
|
||||
|
||||
if rootBytes.len != root.size and leafBytes.len != leaf.size:
|
||||
if rootBytes.len != root.size or leafBytes.len != leaf.size:
|
||||
return failure "Invalid hash length"
|
||||
|
||||
self.verify(leafBytes, rootBytes)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user