mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Require a public key to be retrieved when signing a P2PKH input
If we do not have the public key for a P2PKH input, we should not continue to attempt to sign for it.
This commit is contained in:
@@ -123,7 +123,7 @@ static bool SignStep(const SigningProvider& provider, const BaseSignatureCreator
|
||||
case TX_PUBKEYHASH: {
|
||||
CKeyID keyID = CKeyID(uint160(vSolutions[0]));
|
||||
CPubKey pubkey;
|
||||
GetPubKey(provider, sigdata, keyID, pubkey);
|
||||
if (!GetPubKey(provider, sigdata, keyID, pubkey)) return false;
|
||||
if (!CreateSig(creator, sigdata, provider, sig, pubkey, scriptPubKey, sigversion)) return false;
|
||||
ret.push_back(std::move(sig));
|
||||
ret.push_back(ToByteVector(pubkey));
|
||||
|
||||
Reference in New Issue
Block a user