Skip to content

Commit ed4ccd9

Browse files
committed
fix bug
1 parent 4ebbb84 commit ed4ccd9

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

proof/proof_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -600,16 +600,16 @@ func TestSubtreeConsistency(t *testing.T) {
600600

601601
func TestInclusionSucceedsUpToTreeSize(t *testing.T) {
602602
const maxSize = uint64(555)
603-
for ts := uint64(1); ts <= maxSize; ts++ {
604-
for i := ts; i < ts; i++ {
603+
for ts := range maxSize + 1 {
604+
for i := range ts {
605605
if _, err := Inclusion(i, ts); err != nil {
606606
t.Errorf("Inclusion(ts:%d, i:%d) = %v", ts, i, err)
607607
}
608608
}
609609
}
610610
}
611611

612-
func TestInclusionSubtreeSucceedsUpToTreeSize(t *testing.T) {
612+
func TestSubtreeInclusionSucceedsUpToTreeSize(t *testing.T) {
613613
const maxSize = uint64(555)
614614
for sbe := uint64(1); sbe <= maxSize; sbe++ {
615615
for sbs := range sbe {
@@ -824,9 +824,9 @@ func inclusion(t *testing.T, index, size uint64) Nodes {
824824

825825
func TestFindSubtrees(t *testing.T) {
826826
for _, tc := range []struct {
827-
start, end uint64
828-
wantStart, wantMid, wantEnd uint64
829-
wantErr bool
827+
start, end uint64
828+
wantStart, wantMid, wantEnd uint64
829+
wantErr bool
830830
}{
831831
// Single entry subtrees:
832832
{start: 0, end: 1, wantStart: 0, wantMid: 1, wantEnd: 1},

0 commit comments

Comments
 (0)