Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-forbes committed Aug 17, 2022
1 parent e0d45e0 commit c006232
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/inclusion/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ func calculateSubTreeRootCoordinates(maxDepth, start, end uint64) []coord {
}
nodeRangeCursor = uint64(1)
}
// recursively climb the tree starting at the left most leaf node (the starting leaf).
// recursively climb the tree starting at the left most leaf node (the
// starting leaf), and save each subtree root as we find it. After finding a
// subtree root, if there's still leaves left in the message, then restart
// the process from that leaf.
for {
switch {
// check if we're finished, if so add the last coord and return
Expand All @@ -110,7 +113,7 @@ func calculateSubTreeRootCoordinates(maxDepth, start, end uint64) []coord {
leafCursor++
reset()
// proceed to climb higher by incrementing the relevant state and
// proceeding through the loop.
// progressing through the loop.
default:
lastLeafCursor = leafCursor
lastNodeCursor = nodeCursor
Expand Down

0 comments on commit c006232

Please sign in to comment.