@@ -46,7 +46,7 @@ func TestProofVerifyTwoLeaves(t *testing.T) {
46
46
proof , cis , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {ffx32KeyTest }, nil )
47
47
48
48
cfg := GetConfig ()
49
- if ! VerifyVerkleProof (proof , cis , zis , yis , cfg ) {
49
+ if ok , err := VerifyVerkleProof (proof , cis , zis , yis , cfg ); ! ok || err != nil {
50
50
t .Fatalf ("could not verify verkle proof: %s" , ToDot (root ))
51
51
}
52
52
}
@@ -68,7 +68,7 @@ func TestProofVerifyMultipleLeaves(t *testing.T) {
68
68
proof , cis , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {keys [0 ]}, nil )
69
69
70
70
cfg := GetConfig ()
71
- if ! VerifyVerkleProof (proof , cis , zis , yis , cfg ) {
71
+ if ok , err := VerifyVerkleProof (proof , cis , zis , yis , cfg ); ! ok || err != nil {
72
72
t .Fatal ("could not verify verkle proof" )
73
73
}
74
74
}
@@ -94,7 +94,7 @@ func TestMultiProofVerifyMultipleLeaves(t *testing.T) {
94
94
t .Fatal (err )
95
95
}
96
96
cfg := GetConfig ()
97
- if ! VerifyVerkleProof (proof , pe .Cis , pe .Zis , pe .Yis , cfg ) {
97
+ if ok , err := VerifyVerkleProof (proof , pe .Cis , pe .Zis , pe .Yis , cfg ); ! ok || err != nil {
98
98
t .Fatal ("could not verify verkle proof" )
99
99
}
100
100
}
@@ -137,7 +137,7 @@ func TestMultiProofVerifyMultipleLeavesWithAbsentStem(t *testing.T) {
137
137
}
138
138
139
139
cfg := GetConfig ()
140
- if ! VerifyVerkleProof (proof , pe .Cis , pe .Zis , pe .Yis , cfg ) {
140
+ if ok , err := VerifyVerkleProof (proof , pe .Cis , pe .Zis , pe .Yis , cfg ); ! ok || err != nil {
141
141
t .Fatal ("could not verify verkle proof" )
142
142
}
143
143
}
@@ -159,7 +159,7 @@ func TestMultiProofVerifyMultipleLeavesCommitmentRedundancy(t *testing.T) {
159
159
t .Fatal (err )
160
160
}
161
161
cfg := GetConfig ()
162
- if ! VerifyVerkleProof (proof , pe .Cis , pe .Zis , pe .Yis , cfg ) {
162
+ if ok , err := VerifyVerkleProof (proof , pe .Cis , pe .Zis , pe .Yis , cfg ); ! ok || err != nil {
163
163
t .Fatal ("could not verify verkle proof" )
164
164
}
165
165
}
@@ -174,7 +174,7 @@ func TestProofOfAbsenceInternalVerify(t *testing.T) {
174
174
proof , cis , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {ffx32KeyTest }, nil )
175
175
176
176
cfg := GetConfig ()
177
- if ! VerifyVerkleProof (proof , cis , zis , yis , cfg ) {
177
+ if ok , err := VerifyVerkleProof (proof , cis , zis , yis , cfg ); ! ok || err != nil {
178
178
t .Fatal ("could not verify verkle proof" )
179
179
}
180
180
}
@@ -189,7 +189,7 @@ func TestProofOfAbsenceLeafVerify(t *testing.T) {
189
189
proof , cis , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {oneKeyTest }, nil )
190
190
191
191
cfg := GetConfig ()
192
- if ! VerifyVerkleProof (proof , cis , zis , yis , cfg ) {
192
+ if ok , err := VerifyVerkleProof (proof , cis , zis , yis , cfg ); ! ok || err != nil {
193
193
t .Fatal ("could not verify verkle proof" )
194
194
}
195
195
}
@@ -208,7 +208,7 @@ func TestProofOfAbsenceLeafVerifyOtherSuffix(t *testing.T) {
208
208
proof , cis , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {key }, nil )
209
209
210
210
cfg := GetConfig ()
211
- if ! VerifyVerkleProof (proof , cis , zis , yis , cfg ) {
211
+ if ok , err := VerifyVerkleProof (proof , cis , zis , yis , cfg ); ! ok || err != nil {
212
212
t .Fatal ("could not verify verkle proof" )
213
213
}
214
214
}
@@ -227,7 +227,7 @@ func TestProofOfAbsenceStemVerify(t *testing.T) {
227
227
proof , cis , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {key }, nil )
228
228
229
229
cfg := GetConfig ()
230
- if ! VerifyVerkleProof (proof , cis , zis , yis , cfg ) {
230
+ if ok , err := VerifyVerkleProof (proof , cis , zis , yis , cfg ); ! ok || err != nil {
231
231
t .Fatal ("could not verify verkle proof" )
232
232
}
233
233
}
@@ -378,7 +378,7 @@ func TestProofDeserialize(t *testing.T) {
378
378
t .Fatal (err )
379
379
}
380
380
cfg := GetConfig ()
381
- if ! VerifyVerkleProof (deserialized , pe .Cis , pe .Zis , pe .Yis , cfg ) {
381
+ if ok , err := VerifyVerkleProof (deserialized , pe .Cis , pe .Zis , pe .Yis , cfg ); ! ok || err != nil {
382
382
t .Fatal ("could not verify verkle proof" )
383
383
}
384
384
}
@@ -392,7 +392,7 @@ func TestProofOfAbsenceEdgeCase(t *testing.T) {
392
392
ret , _ := hex .DecodeString ("0303030303030303030303030303030303030303030303030303030303030303" )
393
393
proof , cs , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {ret }, nil )
394
394
cfg := GetConfig ()
395
- if ! VerifyVerkleProof (proof , cs , zis , yis , cfg ) {
395
+ if ok , err := VerifyVerkleProof (proof , cs , zis , yis , cfg ); ! ok || err != nil {
396
396
t .Fatal ("could not verify proof" )
397
397
}
398
398
}
@@ -411,7 +411,7 @@ func TestProofOfAbsenceOtherMultipleLeaves(t *testing.T) {
411
411
ret2 , _ := hex .DecodeString ("0303030303030303030303030303030303030303030303030303030303030301" )
412
412
proof , cs , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {ret1 , ret2 }, nil )
413
413
cfg := GetConfig ()
414
- if ! VerifyVerkleProof (proof , cs , zis , yis , cfg ) {
414
+ if ok , err := VerifyVerkleProof (proof , cs , zis , yis , cfg ); ! ok || err != nil {
415
415
t .Fatal ("could not verify proof" )
416
416
}
417
417
@@ -432,7 +432,7 @@ func TestProofOfAbsenceNoneMultipleStems(t *testing.T) {
432
432
ret2 , _ := hex .DecodeString ("0303030303030303030303030303030303030303030303030303030303030200" )
433
433
proof , cs , zis , yis , _ := MakeVerkleMultiProof (root , [][]byte {ret1 , ret2 }, nil )
434
434
cfg := GetConfig ()
435
- if ! VerifyVerkleProof (proof , cs , zis , yis , cfg ) {
435
+ if ok , err := VerifyVerkleProof (proof , cs , zis , yis , cfg ); ! ok || err != nil {
436
436
t .Fatal ("could not verify proof" )
437
437
}
438
438
0 commit comments