Skip to content

Commit a14b562

Browse files
committed
Add simple breaking test case
1 parent 46549a4 commit a14b562

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
@@ -559,6 +559,10 @@ void rangeproof_test(size_t digit_base, size_t num_bits, uint64_t value, uint64_
559559

560560
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);
561561
CHECK(res == 1);
562+
563+
proof[plen - 1] ^= 1;
564+
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);
565+
CHECK(res == 0);
562566
}
563567

564568
void run_bppp_tests(void) {

0 commit comments

Comments
 (0)