Skip to content

Commit

Permalink
Merge litecoin-project#529: fix tests.c in the count == 0 case
Browse files Browse the repository at this point in the history
95e99f1 fix tests.c in the count == 0 case (Andrew Poelstra)

Pull request description:

  Fixes litecoin-project#528

Tree-SHA512: 8b28d84f95bcd1337fbd7fb187dee2a9bad2b6b595eaf42a2d855e5784f48a1f3ad5739881b22eea115d32c4525feb69b41958699a165c847fcfb8096cc4903a
  • Loading branch information
sipa committed May 31, 2018
2 parents 452d8e4 + 95e99f1 commit 1e6f1f5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -2725,6 +2725,11 @@ void test_ecmult_multi(secp256k1_scratch *scratch, secp256k1_ecmult_multi_func e
}

/* Sanity check that zero scalars don't cause problems */
for (ncount = 0; ncount < 20; ncount++) {
random_scalar_order(&sc[ncount]);
random_group_element_test(&pt[ncount]);
}

secp256k1_scalar_clear(&sc[0]);
CHECK(ecmult_multi(&ctx->ecmult_ctx, scratch, &r, &szero, ecmult_multi_callback, &data, 20));
secp256k1_scalar_clear(&sc[1]);
Expand Down

0 comments on commit 1e6f1f5

Please sign in to comment.