Skip to content

Commit f94ee2a

Browse files
committed
fix: test + build
1 parent feb2ac3 commit f94ee2a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

go/ops.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func validateIavlOps(op opType, layerNum int) error {
5757
remLen := r.Len()
5858
if layerNum == 0 {
5959
if remLen != 0 {
60-
return fmt.Errorf("expected remaining prefix to be 0, got: %d", r2)
60+
return fmt.Errorf("expected remaining prefix to be 0, got: %d", remLen)
6161
}
6262
} else {
6363
// when the child comes from the left, the suffix if filled in

go/ops_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TestInnerOpCheckAgainstSpec(t *testing.T) {
114114
func() {
115115
innerOp.Prefix = []byte{0x01}
116116
},
117-
fmt.Errorf("wrong value in IAVL leaf op"),
117+
fmt.Errorf("IAVL height (-1) must be non-negative and less than the layer number (1)"),
118118
},
119119
{
120120
"failure: inner prefix starts with leaf prefix",

go/proof_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestCheckAgainstSpec(t *testing.T) {
5252
if tc.Err == "" && err != nil {
5353
t.Fatalf("Unexpected error: %v", err)
5454
} else if tc.Err != "" && tc.Err != err.Error() {
55-
t.Fatalf("Expected error: %s, got %s", tc.Err, err.Error())
55+
t.Fatalf("Expected error: %s, got: %s", tc.Err, err.Error())
5656
}
5757
})
5858
}

testdata/TestCheckAgainstSpecData.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@
907907
"hash": 1
908908
}
909909
},
910-
"Err": "inner, unexpected EOF"
910+
"Err": "inner, IAVL height (0) must be non-negative and less than the layer number (3)"
911911
},
912912
"rejects only inner proof (hash mismatch)": {
913913
"Proof": {

0 commit comments

Comments
 (0)