Skip to content

Commit

Permalink
Update merkle/merkle.go comment
Browse files Browse the repository at this point in the history
Co-authored-by: beer-1 <[email protected]>
  • Loading branch information
sh-cha and beer-1 authored Dec 10, 2024
1 parent a14fb52 commit 2abee5e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions merkle/merkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ func (m *Merkle) PrepareWorkingTree(lastWorkingTree merkletypes.TreeInfo) error
}

// Height returns the height of the working tree.
//
// Example:
// - For 7 leaves, the height is 3.
// - For 8 leaves, the height is 3.
// - For 9 leaves, the height is 4.
// - For 16 leaves, the height is 4.
func (m *Merkle) Height() (uint8, error) {
if m.workingTree == nil {
return 0, errors.New("working tree is not initialized")
Expand Down

0 comments on commit 2abee5e

Please sign in to comment.