tests: Use global copy of secp256k1_context_static instead of clone

This commit is contained in:
Tim Ruffing
2022-12-07 14:56:43 +01:00
parent 2a39ac162e
commit b19806122e
4 changed files with 19 additions and 16 deletions

View File

@@ -30,7 +30,6 @@ static int recovery_test_nonce_function(unsigned char *nonce32, const unsigned c
void test_ecdsa_recovery_api(void) {
/* Setup contexts that just count errors */
secp256k1_context *sttc = secp256k1_context_clone(secp256k1_context_static);
secp256k1_pubkey pubkey;
secp256k1_pubkey recpubkey;
secp256k1_ecdsa_signature normal_sig;
@@ -124,7 +123,8 @@ void test_ecdsa_recovery_api(void) {
CHECK(ecount == 7);
/* cleanup */
secp256k1_context_destroy(sttc);
secp256k1_context_set_error_callback(sttc, NULL, NULL);
secp256k1_context_set_illegal_callback(sttc, NULL, NULL);
}
void test_ecdsa_recovery_end_to_end(void) {