diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/script/sign.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index c721b20ced..89cc7c808c 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -280,6 +280,11 @@ bool SignPSBTInput(const SigningProvider& provider, const CMutableTransaction& t if (require_witness_sig && !sigdata.witness) return false; input.FromSignatureData(sigdata); + if (sigdata.witness) { + assert(!utxo.IsNull()); + input.witness_utxo = utxo; + } + // If both UTXO types are present, drop the unnecessary one. if (input.non_witness_utxo && !input.witness_utxo.IsNull()) { if (sigdata.witness) { |