mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Remove unnecessary cast in CKey::SignSchnorr
This commit is contained in:
@@ -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);
|
uint256 tweak = XOnlyPubKey(pubkey_bytes).ComputeTapTweakHash(merkle_root->IsNull() ? nullptr : merkle_root);
|
||||||
if (!secp256k1_keypair_xonly_tweak_add(GetVerifyContext(), &keypair, tweak.data())) return false;
|
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, (unsigned char*)aux.data());
|
bool ret = secp256k1_schnorrsig_sign(secp256k1_context_sign, sig.data(), hash.data(), &keypair, aux.data());
|
||||||
if (ret) {
|
if (ret) {
|
||||||
// Additional verification step to prevent using a potentially corrupted signature
|
// Additional verification step to prevent using a potentially corrupted signature
|
||||||
secp256k1_xonly_pubkey pubkey_verify;
|
secp256k1_xonly_pubkey pubkey_verify;
|
||||||
|
|||||||
Reference in New Issue
Block a user