From e05039f67b3d7a44cd9079f3a57d75a3161cb3f1 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 22 Feb 2024 12:47:12 +0100 Subject: [PATCH] spend: don't populate non_witness_utxo for Taproot --- src/spend.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/spend.rs b/src/spend.rs index 555ec621..a8c4d598 100644 --- a/src/spend.rs +++ b/src/spend.rs @@ -763,7 +763,9 @@ pub fn create_spend( value: cand.amount, script_pubkey: coin_desc.script_pubkey(), }); - psbt_in.non_witness_utxo = tx_getter.get_tx(&cand.outpoint.txid); + if !main_descriptor.is_taproot() { + psbt_in.non_witness_utxo = tx_getter.get_tx(&cand.outpoint.txid); + } psbt_ins.push(psbt_in); }