Skip to content
This repository was archived by the owner on Nov 28, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/secp256k1/src/modules/rangeproof/tests_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ static void test_rangeproof(void) {
CHECK(maxv >= v);
}
memcpy(&commit2, &commit, sizeof(commit));
for (i = 0; i < 10 * (size_t) count; i++) {
for (i = 0; i < (size_t) 2*count; i++) {
int exp;
int min_bits;
v = secp256k1_rands64(0, UINT64_MAX >> (secp256k1_rand32()&63));
Expand Down Expand Up @@ -526,13 +526,13 @@ static void test_rangeproof(void) {
}
CHECK(mlen <= 4096);
CHECK(memcmp(blindout, blind, 32) == 0);
CHECK(vout == v);

CHECK(minv <= v);
CHECK(maxv >= v);
CHECK(secp256k1_rangeproof_rewind(ctx, blindout, &vout, NULL, NULL, commit.data, &minv, &maxv, &commit, proof, len, NULL, 0, secp256k1_generator_h));
memcpy(&commit2, &commit, sizeof(commit));
}
for (j = 0; j < 10; j++) {
for (j = 0; j < 5; j++) {
for (i = 0; i < 96; i++) {
secp256k1_rand256(&proof[i * 32]);
}
Expand Down Expand Up @@ -656,8 +656,8 @@ void test_rangeproof_fixed_vectors(void) {
0xf5, 0x1e, 0x0d, 0xc5, 0x86, 0x78, 0x51, 0xa9, 0x00, 0x00, 0xef, 0x4d, 0xe2, 0x94, 0x60, 0x89,
0x83, 0x04, 0xb4, 0x0e, 0x90, 0x10, 0x05, 0x1c, 0x7f, 0xd7, 0x33, 0x92, 0x1f, 0xe7, 0x74, 0x59
};
size_t min_value_1;
size_t max_value_1;
uint64_t min_value_1;
uint64_t max_value_1;
secp256k1_pedersen_commitment pc;

CHECK(secp256k1_pedersen_commitment_parse(ctx, &pc, commit_1));
Expand Down