From 9dc4be9dfb9432174a315c2deb0b232615504025 Mon Sep 17 00:00:00 2001 From: LLFourn Date: Mon, 11 Apr 2022 13:48:48 +1000 Subject: [PATCH] Make sure at least one utxo is there for Tr input We can only omit non_witness_utxo for Tr if it has witness_utxo. --- src/psbt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/psbt/mod.rs b/src/psbt/mod.rs index 3834d6a5e..4dd1c95c8 100644 --- a/src/psbt/mod.rs +++ b/src/psbt/mod.rs @@ -965,7 +965,7 @@ impl PsbtInputExt for psbt::Input { } None => { match derived { - Descriptor::Tr(_) => { /*Tr outputs can always omit non_witness_utxo*/ } + Descriptor::Tr(_) if check_witness_utxo => { /*can be omited*/ } _ => return Err(UpdateInputError::NonWitnessUtxoCheck), } }