Skip to content

Commit

Permalink
Make sure at least one utxo is there for Tr input
Browse files Browse the repository at this point in the history
We can only omit non_witness_utxo for Tr if it has witness_utxo.
  • Loading branch information
LLFourn committed Apr 11, 2022
1 parent a865724 commit 9dc4be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/psbt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}
Expand Down

0 comments on commit 9dc4be9

Please # to comment.