Skip to content

Commit f329a25

Browse files
committed
chore: update error message to be more informative
1 parent e97c91d commit f329a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/ops.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func validateIavlOps(op opType, layerNum int) error {
6666
// when the child comes from the right, the suffix is empty
6767
// prefix: height | size | version | length byte | 32 byte hash | next length byte (34 remainder)
6868
if remLen != 1 && remLen != 34 {
69-
return fmt.Errorf("invalid op")
69+
return fmt.Errorf("remainder of prefix must be of length 1 or 34, got: %d", remLen)
7070
}
7171
if op.GetHash() != HashOp_SHA256 {
7272
return fmt.Errorf("IAVL hash op must be %v", HashOp_SHA256)

0 commit comments

Comments
 (0)