From 2abee5e68a7550ccd6356e0a5ab41d9ac9bd2f5a Mon Sep 17 00:00:00 2001 From: Hoon <48665813+sh-cha@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:58:46 +0900 Subject: [PATCH] Update merkle/merkle.go comment Co-authored-by: beer-1 <147697694+beer-1@users.noreply.github.com> --- merkle/merkle.go | 6 ++++++ 1 file changed, 6 insertions(+) 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")