diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/sign.cpp | 5 | ||||
-rw-r--r-- | src/script/sign.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index 5cdc0112dc..1e481dd541 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -244,8 +244,11 @@ bool PSBTInputSigned(PSBTInput& input) return !input.final_script_sig.empty() || !input.final_script_witness.IsNull(); } -bool SignPSBTInput(const SigningProvider& provider, const CMutableTransaction& tx, PSBTInput& input, int index, int sighash) +bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction& psbt, int index, int sighash) { + PSBTInput& input = psbt.inputs.at(index); + const CMutableTransaction& tx = *psbt.tx; + if (PSBTInputSigned(input)) { return true; } diff --git a/src/script/sign.h b/src/script/sign.h index 35f7630f41..e71f43f96d 100644 --- a/src/script/sign.h +++ b/src/script/sign.h @@ -734,7 +734,7 @@ bool SignSignature(const SigningProvider &provider, const CTransaction& txFrom, bool PSBTInputSigned(PSBTInput& input); /** Signs a PSBTInput, verifying that all provided data matches what is being signed. */ -bool SignPSBTInput(const SigningProvider& provider, const CMutableTransaction& tx, PSBTInput& input, int index, int sighash = SIGHASH_ALL); +bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction& psbt, int index, int sighash = SIGHASH_ALL); /** Extract signature data from a transaction input, and insert it. */ SignatureData DataFromTransaction(const CMutableTransaction& tx, unsigned int nIn, const CTxOut& txout); |