examples: Switch to NONE contexts
This commit is contained in:
@@ -30,12 +30,8 @@ int main(void) {
|
||||
int return_val;
|
||||
secp256k1_xonly_pubkey pubkey;
|
||||
secp256k1_keypair keypair;
|
||||
/* The specification in secp256k1_extrakeys.h states that `secp256k1_keypair_create`
|
||||
* needs a context object initialized for signing. And in secp256k1_schnorrsig.h
|
||||
* they state that `secp256k1_schnorrsig_verify` needs a context initialized for
|
||||
* verification, which is why we create a context for both signing and verification
|
||||
* with the SECP256K1_CONTEXT_SIGN and SECP256K1_CONTEXT_VERIFY flags. */
|
||||
secp256k1_context* ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
|
||||
/* Before we can call actual API functions, we need to create a "context". */
|
||||
secp256k1_context* ctx = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
|
||||
if (!fill_random(randomize, sizeof(randomize))) {
|
||||
printf("Failed to generate randomness\n");
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user