Skip to content

Commit c0da897

Browse files
committed
Add simple breaking test case
1 parent da6288c commit c0da897

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/bppp/tests_impl.h

+4
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,10 @@ void rangeproof_test(size_t digit_base, size_t num_bits, uint64_t value, uint64_
582582

583583
res = secp256k1_bppp_rangeproof_verify(secp_ctx, scratch, gs, &asset_genp, proof, plen, num_bits, digit_base, min_value, &commit, extra_commit, extra_commit_len);
584584
CHECK(res == 1);
585+
586+
proof[plen - 1] ^= 1;
587+
res = secp256k1_bppp_rangeproof_verify(secp_ctx, scratch, gs, &asset_genp, proof, plen, num_bits, digit_base, min_value, &commit, extra_commit, extra_commit_len);
588+
CHECK(res == 0);
585589
}
586590

587591
void run_bppp_tests(void) {

0 commit comments

Comments
 (0)