We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ffec2f commit 788d7f6Copy full SHA for 788d7f6
types/row_proof.go
@@ -34,6 +34,11 @@ func (rp RowProof) Validate(root []byte) error {
34
if len(rp.Proofs) != len(rp.RowRoots) {
35
return fmt.Errorf("the number of proofs %d must equal the number of row roots %d", len(rp.Proofs), len(rp.RowRoots))
36
}
37
+ if len(rp.Proofs) != 0 &&
38
+ (int64(rp.StartRow) != rp.Proofs[0].Index ||
39
+ int64(rp.StartRow) != rp.Proofs[len(rp.Proofs)-1].Index) {
40
+ return fmt.Errorf("invalid start/end row")
41
+ }
42
if !rp.VerifyProof(root) {
43
return errors.New("row proof failed to verify")
44
0 commit comments