Skip to content

Commit

Permalink
fix: test + build
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed Oct 10, 2024
1 parent feb2ac3 commit f94ee2a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go/ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func validateIavlOps(op opType, layerNum int) error {
remLen := r.Len()
if layerNum == 0 {
if remLen != 0 {
return fmt.Errorf("expected remaining prefix to be 0, got: %d", r2)
return fmt.Errorf("expected remaining prefix to be 0, got: %d", remLen)
}
} else {
// when the child comes from the left, the suffix if filled in
Expand Down
2 changes: 1 addition & 1 deletion go/ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestInnerOpCheckAgainstSpec(t *testing.T) {
func() {
innerOp.Prefix = []byte{0x01}
},
fmt.Errorf("wrong value in IAVL leaf op"),
fmt.Errorf("IAVL height (-1) must be non-negative and less than the layer number (1)"),
},
{
"failure: inner prefix starts with leaf prefix",
Expand Down
2 changes: 1 addition & 1 deletion go/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestCheckAgainstSpec(t *testing.T) {
if tc.Err == "" && err != nil {
t.Fatalf("Unexpected error: %v", err)
} else if tc.Err != "" && tc.Err != err.Error() {
t.Fatalf("Expected error: %s, got %s", tc.Err, err.Error())
t.Fatalf("Expected error: %s, got: %s", tc.Err, err.Error())
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion testdata/TestCheckAgainstSpecData.json
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@
"hash": 1
}
},
"Err": "inner, unexpected EOF"
"Err": "inner, IAVL height (0) must be non-negative and less than the layer number (3)"
},
"rejects only inner proof (hash mismatch)": {
"Proof": {
Expand Down

0 comments on commit f94ee2a

Please sign in to comment.