File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
internal/sparse-merkle-tree
pkg/sparse-merkle-tree/core Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -153,12 +153,12 @@ func (idx *nodeIndex) Equal(other core.NodeRef) bool {
153
153
func (idx * nodeIndex ) ToPath (levels int ) []bool {
154
154
path := make ([]bool , levels )
155
155
for l := 0 ; l < levels ; l ++ {
156
- path [l ] = idx .IsBitOn (uint (l ))
156
+ path [l ] = idx .IsBitOne (uint (l ))
157
157
}
158
158
return path
159
159
}
160
160
161
- func (idx * nodeIndex ) IsBitOn (pos uint ) bool {
161
+ func (idx * nodeIndex ) IsBitOne (pos uint ) bool {
162
162
if pos >= 256 {
163
163
return false
164
164
}
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ func (p *proof) AllSiblings() []core.NodeRef {
89
89
func (p * proof ) getPath (index core.NodeIndex ) []bool {
90
90
path := make ([]bool , p .depth )
91
91
for n := 0 ; n < int (p .depth ); n ++ {
92
- path [n ] = index .IsBitOn (uint (n ))
92
+ path [n ] = index .IsBitOne (uint (n ))
93
93
}
94
94
return path
95
95
}
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ type NodeRef interface {
49
49
// NodeIndex defines the functions of leaf nodes in the SMT, which provide access to their node paths in addition to the NodeRef functions.
50
50
type NodeIndex interface {
51
51
NodeRef
52
- // IsBitOn returns true if the index bit at the given position is 1
53
- IsBitOn (uint ) bool
52
+ // IsBitOne returns true if the index bit at the given position is 1
53
+ IsBitOne (uint ) bool
54
54
// ToPath returns the binary path from the root to the leaf
55
55
ToPath (int ) []bool
56
56
}
You can’t perform that action at this time.
0 commit comments