nim-merkletree/tests/helpers.nim
E M dee521f711
WIP: Add entire merkletree module from codex
This commit does not compile.

There is a circular dependency importing the MerkleTree type. The interface needs to be defined in such a way that we can avoid this circular dependency.
2026-01-16 22:03:42 +11:00

12 lines
340 B
Nim

import pkg/merkletree
# import ./helpers
export merkletree#, helpers
proc `==`*(a, b: CodexTree): bool =
(a.mcodec == b.mcodec) and (a.leavesCount == b.leavesCount) and (a.levels == b.levels)
proc `==`*(a, b: CodexProof): bool =
(a.mcodec == b.mcodec) and (a.nleaves == b.nleaves) and (a.path == b.path) and
(a.index == b.index)