aboutsummaryrefslogtreecommitdiff
path: root/src/script/sign.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r--src/script/sign.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 190c0bf687..945e162355 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -233,10 +233,14 @@ bool ProduceSignature(const SigningProvider& provider, const BaseSignatureCreato
return sigdata.complete;
}
+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, SignatureData& sigdata, int index, int sighash)
{
- // if this input has a final scriptsig or scriptwitness, don't do anything with it
- if (!input.final_script_sig.empty() || !input.final_script_witness.IsNull()) {
+ if (PSBTInputSigned(input)) {
return true;
}