diff options
author | Andrew Chow <achow101-github@achow101.com> | 2018-11-08 10:08:46 -0500 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2018-11-08 10:38:43 -0500 |
commit | 6b8d86ddb803d50d8608d95f7e8f791511dec8b9 (patch) | |
tree | 33a41f992ee78992960871af6b010dda8345cc10 /src/script/sign.cpp | |
parent | 11e1ac3ae08535cefbd8235a8deb6cd100bcb2b1 (diff) |
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.
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r-- | src/script/sign.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 89cc7c808c..68ceea7e6f 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -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)); |