diff options
author | Andrew Chow <achow101-github@achow101.com> | 2021-07-20 21:24:56 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2021-09-28 19:13:42 -0400 |
commit | a99ed8986554fa1ecc854e43ea373d957e598db8 (patch) | |
tree | fd6a13369e76b602f866f185a3ad57b74720634c /src/wallet/external_signer_scriptpubkeyman.cpp | |
parent | 6a5381a06b0b9b4490394e42a8e3bc284601a4af (diff) | |
download | bitcoin-a99ed8986554fa1ecc854e43ea373d957e598db8.tar.xz |
psbt: sign without finalizing
We don't always want to finalize after signing, so make it possible to
do that.
Diffstat (limited to 'src/wallet/external_signer_scriptpubkeyman.cpp')
-rw-r--r-- | src/wallet/external_signer_scriptpubkeyman.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/external_signer_scriptpubkeyman.cpp b/src/wallet/external_signer_scriptpubkeyman.cpp index efef1ec754..6a73efb472 100644 --- a/src/wallet/external_signer_scriptpubkeyman.cpp +++ b/src/wallet/external_signer_scriptpubkeyman.cpp @@ -60,10 +60,10 @@ bool ExternalSignerScriptPubKeyMan::DisplayAddress(const CScript scriptPubKey, c } // If sign is true, transaction must previously have been filled -TransactionError ExternalSignerScriptPubKeyMan::FillPSBT(PartiallySignedTransaction& psbt, const PrecomputedTransactionData& txdata, int sighash_type, bool sign, bool bip32derivs, int* n_signed) const +TransactionError ExternalSignerScriptPubKeyMan::FillPSBT(PartiallySignedTransaction& psbt, const PrecomputedTransactionData& txdata, int sighash_type, bool sign, bool bip32derivs, int* n_signed, bool finalize) const { if (!sign) { - return DescriptorScriptPubKeyMan::FillPSBT(psbt, txdata, sighash_type, false, bip32derivs, n_signed); + return DescriptorScriptPubKeyMan::FillPSBT(psbt, txdata, sighash_type, false, bip32derivs, n_signed, finalize); } // Already complete if every input is now signed @@ -79,6 +79,6 @@ TransactionError ExternalSignerScriptPubKeyMan::FillPSBT(PartiallySignedTransact tfm::format(std::cerr, "Failed to sign: %s\n", strFailReason); return TransactionError::EXTERNAL_SIGNER_FAILED; } - FinalizePSBT(psbt); // This won't work in a multisig setup + if (finalize) FinalizePSBT(psbt); // This won't work in a multisig setup return TransactionError::OK; } |