diff --git a/go-sdk/internal/sparse-merkle-tree/node/node.go b/go-sdk/internal/sparse-merkle-tree/node/node.go index ce02269..e031592 100644 --- a/go-sdk/internal/sparse-merkle-tree/node/node.go +++ b/go-sdk/internal/sparse-merkle-tree/node/node.go @@ -153,12 +153,12 @@ func (idx *nodeIndex) Equal(other core.NodeRef) bool { func (idx *nodeIndex) ToPath(levels int) []bool { path := make([]bool, levels) for l := 0; l < levels; l++ { - path[l] = idx.IsBitOn(uint(l)) + path[l] = idx.IsBitOne(uint(l)) } return path } -func (idx *nodeIndex) IsBitOn(pos uint) bool { +func (idx *nodeIndex) IsBitOne(pos uint) bool { if pos >= 256 { return false } diff --git a/go-sdk/internal/sparse-merkle-tree/smt/proof.go b/go-sdk/internal/sparse-merkle-tree/smt/proof.go index a286622..4f5fc3c 100644 --- a/go-sdk/internal/sparse-merkle-tree/smt/proof.go +++ b/go-sdk/internal/sparse-merkle-tree/smt/proof.go @@ -89,7 +89,7 @@ func (p *proof) AllSiblings() []core.NodeRef { func (p *proof) getPath(index core.NodeIndex) []bool { path := make([]bool, p.depth) for n := 0; n < int(p.depth); n++ { - path[n] = index.IsBitOn(uint(n)) + path[n] = index.IsBitOne(uint(n)) } return path } diff --git a/go-sdk/pkg/sparse-merkle-tree/core/node.go b/go-sdk/pkg/sparse-merkle-tree/core/node.go index a9f853d..5732922 100644 --- a/go-sdk/pkg/sparse-merkle-tree/core/node.go +++ b/go-sdk/pkg/sparse-merkle-tree/core/node.go @@ -49,8 +49,8 @@ type NodeRef interface { // NodeIndex defines the functions of leaf nodes in the SMT, which provide access to their node paths in addition to the NodeRef functions. type NodeIndex interface { NodeRef - // IsBitOn returns true if the index bit at the given position is 1 - IsBitOn(uint) bool + // IsBitOne returns true if the index bit at the given position is 1 + IsBitOne(uint) bool // ToPath returns the binary path from the root to the leaf ToPath(int) []bool }