diff --git a/merkle/merkle.go b/merkle/merkle.go index f27efc9..09c9f99 100644 --- a/merkle/merkle.go +++ b/merkle/merkle.go @@ -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")