Skip to content

Commit

Permalink
fixes the description of absence index in the calculateAbsenceIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
staheri14 committed Mar 2, 2023
1 parent 4276d17 commit 9d09041
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,8 @@ func (n *NamespacedMerkleTree) GetWithProof(nID namespace.ID) ([][]byte, Proof,
}

// calculateAbsenceIndex returns the index of a leaf of the tree that 1) its
// namespace ID is the largest namespace ID less than nid and 2) the namespace
// ID of the leaf to the left of it is smaller than the nid 3) the namespace ID
// of the leaf to the right of it is larger than nid.
// namespace ID is the smallest namespace ID larger than nID and 2) the namespace
// ID of the leaf to the left of it is smaller than the nID.
func (n *NamespacedMerkleTree) calculateAbsenceIndex(nID namespace.ID) int {
nidSize := n.treeHasher.NamespaceSize()
var prevLeaf []byte
Expand Down

0 comments on commit 9d09041

Please sign in to comment.