Skip to content

Commit

Permalink
chore: add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
albttx committed May 24, 2023
1 parent 60e3b9c commit f2c8329
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/gno.land/p/demo/merkle/merkle.gno
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type Tree struct {
layers []nodes
}

// Root return the merkle root of the tree
func (t *Tree) Root() string {
for _, l := range t.layers {
if len(l) == 1 {
Expand All @@ -36,6 +37,7 @@ func (t *Tree) Root() string {
return ""
}

// NewTree create a new Merkle Tree
func NewTree(data []Hashable) *Tree {
tree := &Tree{}

Expand Down

0 comments on commit f2c8329

Please sign in to comment.