diff --git a/nmt.go b/nmt.go index 47e0c09..0272d7e 100644 --- a/nmt.go +++ b/nmt.go @@ -185,8 +185,7 @@ func (n *NamespacedMerkleTree) ProveRange(start, end int) (Proof, error) { // ProveNamespace returns a range proof for the given NamespaceID. // // case 1) If the namespace nID is out of the range of the tree's min and max -// namespace i.e., (nID < n.minNID) or (n.maxNID < nID) ProveNamespace returns -// an error and does not generate any range proof, instead it returns an empty +// namespace i.e., (nID < n.minNID) or (n.maxNID < nID) ProveNamespace returns an empty // Proof with empty nodes and the range (0,0) i.e., Proof.start = 0 and // Proof.end = 0 to indicate that this namespace is not contained in the tree. // @@ -216,7 +215,7 @@ func (n *NamespacedMerkleTree) ProveRange(start, end int) (Proof, error) { func (n *NamespacedMerkleTree) ProveNamespace(nID namespace.ID) (Proof, error) { isMaxNsIgnored := n.treeHasher.IsMaxNamespaceIDIgnored() // case 1) In the cases (n.nID < minNID) or (n.maxNID < nID), return empty - // range and no proof + // range proof if nID.Less(n.minNID) || n.maxNID.Less(nID) { return NewEmptyRangeProof(isMaxNsIgnored), nil }