Skip to content

Commit 47dff66

Browse files
committed
pubkey: fix bug in VerifySchnorr introduced in merge of bitcoin/bitcoin#22448 in 09333e2
1 parent 20c5630 commit 47dff66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pubkey.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ bool XOnlyPubKey::VerifySchnorr(const Span<const unsigned char> msg, Span<const
208208
assert(sigbytes.size() == 64);
209209
secp256k1_xonly_pubkey pubkey;
210210
if (!secp256k1_xonly_pubkey_parse(secp256k1_context_verify, &pubkey, m_keydata.data())) return false;
211-
return secp256k1_schnorrsig_verify(secp256k1_context_verify, sigbytes.data(), msg.begin(), 32, &pubkey);
211+
return secp256k1_schnorrsig_verify(secp256k1_context_verify, sigbytes.data(), msg.data(), msg.size(), &pubkey);
212212
}
213213

214214
// ELEMENTS: this is preserved from an old version of the Taproot code for use in OP_TWEAKVERIFY

0 commit comments

Comments
 (0)