Skip to content

Commit d2c6d48

Browse files
tests: Use new name of static context
1 parent 53796d2 commit d2c6d48

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/modules/extrakeys/tests_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void test_keypair(void) {
359359
secp256k1_context *none = api_test_context(SECP256K1_CONTEXT_NONE, &ecount);
360360
secp256k1_context *sign = api_test_context(SECP256K1_CONTEXT_SIGN, &ecount);
361361
secp256k1_context *verify = api_test_context(SECP256K1_CONTEXT_VERIFY, &ecount);
362-
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_no_precomp);
362+
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_static);
363363
secp256k1_context_set_error_callback(sttc, counting_illegal_callback_fn, &ecount);
364364
secp256k1_context_set_illegal_callback(sttc, counting_illegal_callback_fn, &ecount);
365365

src/modules/recovery/tests_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void test_ecdsa_recovery_api(void) {
3434
secp256k1_context *sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
3535
secp256k1_context *vrfy = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY);
3636
secp256k1_context *both = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
37-
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_no_precomp);
37+
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_static);
3838
secp256k1_pubkey pubkey;
3939
secp256k1_pubkey recpubkey;
4040
secp256k1_ecdsa_signature normal_sig;

src/modules/schnorrsig/tests_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void test_schnorrsig_api(void) {
132132
secp256k1_context *sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
133133
secp256k1_context *vrfy = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY);
134134
secp256k1_context *both = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
135-
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_no_precomp);
135+
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_static);
136136
int ecount;
137137

138138
secp256k1_context_set_error_callback(none, counting_illegal_callback_fn, &ecount);

src/tests.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void run_context_tests(int use_prealloc) {
172172
sign_prealloc = malloc(secp256k1_context_preallocated_size(SECP256K1_CONTEXT_SIGN));
173173
vrfy_prealloc = malloc(secp256k1_context_preallocated_size(SECP256K1_CONTEXT_VERIFY));
174174
both_prealloc = malloc(secp256k1_context_preallocated_size(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY));
175-
sttc_prealloc = malloc(secp256k1_context_preallocated_clone_size(secp256k1_context_no_precomp));
175+
sttc_prealloc = malloc(secp256k1_context_preallocated_clone_size(secp256k1_context_static));
176176
CHECK(none_prealloc != NULL);
177177
CHECK(sign_prealloc != NULL);
178178
CHECK(vrfy_prealloc != NULL);
@@ -182,13 +182,13 @@ void run_context_tests(int use_prealloc) {
182182
sign = secp256k1_context_preallocated_create(sign_prealloc, SECP256K1_CONTEXT_SIGN);
183183
vrfy = secp256k1_context_preallocated_create(vrfy_prealloc, SECP256K1_CONTEXT_VERIFY);
184184
both = secp256k1_context_preallocated_create(both_prealloc, SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
185-
sttc = secp256k1_context_preallocated_clone(secp256k1_context_no_precomp, sttc_prealloc);
185+
sttc = secp256k1_context_preallocated_clone(secp256k1_context_static, sttc_prealloc);
186186
} else {
187187
none = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
188188
sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
189189
vrfy = secp256k1_context_create(SECP256K1_CONTEXT_VERIFY);
190190
both = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
191-
sttc = secp256k1_context_clone(secp256k1_context_no_precomp);
191+
sttc = secp256k1_context_clone(secp256k1_context_static);
192192
}
193193

194194
memset(&zero_pubkey, 0, sizeof(zero_pubkey));
@@ -5802,7 +5802,7 @@ void run_ec_pubkey_parse_test(void) {
58025802
ecount = 0;
58035803
VG_UNDEF(&pubkey, sizeof(pubkey));
58045804
CHECK(secp256k1_ec_pubkey_parse(ctx, &pubkey, pubkeyc, 65) == 1);
5805-
CHECK(secp256k1_ec_pubkey_parse(secp256k1_context_no_precomp, &pubkey, pubkeyc, 65) == 1);
5805+
CHECK(secp256k1_ec_pubkey_parse(secp256k1_context_static, &pubkey, pubkeyc, 65) == 1);
58065806
VG_CHECK(&pubkey, sizeof(pubkey));
58075807
CHECK(ecount == 0);
58085808
VG_UNDEF(&ge, sizeof(ge));

0 commit comments

Comments
 (0)