Skip to content

Commit 1176e1e

Browse files
committed
Add simple breaking test case
1 parent 6b6733e commit 1176e1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/bulletproofs/tests_impl.h

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

241241
res = secp256k1_bulletproofs_pp_rangeproof_verify(secp_ctx, scratch, gs, &asset_genp, proof, plen, num_bits, digit_base, min_value, &commit, extra_commit, extra_commit_len);
242242
CHECK(res == 1);
243+
244+
proof[plen - 1] += 1;
245+
res = secp256k1_bulletproofs_pp_rangeproof_verify(secp_ctx, scratch, gs, &asset_genp, proof, plen, num_bits, digit_base, min_value, &commit, extra_commit, extra_commit_len);
246+
CHECK(res == 0);
243247
}
244248

245249
void run_bulletproofs_tests(void) {

0 commit comments

Comments
 (0)