root returns a result

This commit is contained in:
Dmitriy Ryajov 2023-12-17 17:08:06 -06:00
parent befe9775be
commit 5e528756a2
No known key found for this signature in database
GPG Key ID: DA8C680CE7C657A4

View File

@ -140,8 +140,20 @@ proc `$`*(self: CodexTree): string =
", leavesCount: " &
$self.leavesCount & " )"
proc `$`*(self: CodexProof): string =
"CodexProof( mcodec: " &
proc `==`*(a, b: CodexMerkleProof): bool =
(a.mcodec == b.mcodec) and
(a.nleaves == b.nleaves) and
(a.path == b.path) and
(a.index == b.index)
proc `$`*(self: CodexMerkleTree): string =
"CodexMerkleTree( mcodec: " &
$self.mcodec &
", leavesCount: " &
$self.leavesCount & " )"
proc `$`*(self: CodexMerkleProof): string =
"CodexMerkleProof( mcodec: " &
$self.mcodec & ", nleaves: " &
$self.nleaves & ", index: " &
$self.index & " )"