Skip to content

Commit

Permalink
key: use secp256k1_schnorrsig_sign32 over deprecated secp256k1_schnor…
Browse files Browse the repository at this point in the history
…rsig_sign

The renaming occured in
bitcoin-core/secp256k1#1089.
  • Loading branch information
fanquake committed Apr 6, 2022
1 parent 7c07361 commit 0936101
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/key.cpp
Expand Up @@ -288,7 +288,7 @@ bool CKey::SignSchnorr(const uint256& hash, Span<unsigned char> sig, const uint2
uint256 tweak = XOnlyPubKey(pubkey_bytes).ComputeTapTweakHash(merkle_root->IsNull() ? nullptr : merkle_root);
if (!secp256k1_keypair_xonly_tweak_add(GetVerifyContext(), &keypair, tweak.data())) return false;
}
bool ret = secp256k1_schnorrsig_sign(secp256k1_context_sign, sig.data(), hash.data(), &keypair, aux.data());
bool ret = secp256k1_schnorrsig_sign32(secp256k1_context_sign, sig.data(), hash.data(), &keypair, aux.data());
if (ret) {
// Additional verification step to prevent using a potentially corrupted signature
secp256k1_xonly_pubkey pubkey_verify;
Expand Down

0 comments on commit 0936101

Please sign in to comment.