spend: don't populate non_witness_utxo for Taproot

This commit is contained in:
Antoine Poinsot 2024-02-22 12:47:12 +01:00
parent 8596ca76f3
commit e05039f67b
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -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);
}