@@ -549,10 +549,9 @@ pub trait PsbtExt {
549
549
///
550
550
/// This is the checked version of [`update_with_descriptor_unchecked`]. It checks that the
551
551
/// `witness_utxo` and `non_witness_utxo` are sane and have a `script_pubkey` that matches the
552
- /// descriptor. In particular, it makes sure segwit descriptors always have `witness_utxo`
553
- /// present and pre-segwit descriptors always have `non_witness_utxo` present (and the txid
554
- /// matches). If both `witness_utxo` and `non_witness_utxo` are present then it also checks they
555
- /// are consistent with each other.
552
+ /// descriptor. In particular, it makes sure pre-segwit descriptors always have `non_witness_utxo`
553
+ /// present (and the txid matches). If both `witness_utxo` and `non_witness_utxo` are present
554
+ /// then it also checks they are consistent with each other.
556
555
///
557
556
/// Hint: because of the *[segwit bug]* some PSBT signers require that `non_witness_utxo` is
558
557
/// present on segwitv0 inputs regardless but this function doesn't enforce this so you will
@@ -779,18 +778,12 @@ impl PsbtExt for Psbt {
779
778
return Err ( UtxoUpdateError :: UtxoCheck ) ;
780
779
}
781
780
}
782
- ( None , Some ( non_witness_utxo) ) => {
783
- if desc_type. segwit_version ( ) . is_some ( ) {
784
- return Err ( UtxoUpdateError :: UtxoCheck ) ;
785
- }
786
-
787
- non_witness_utxo
788
- . output
789
- . get ( txin. previous_output . vout as usize )
790
- . ok_or ( UtxoUpdateError :: UtxoCheck ) ?
791
- . script_pubkey
792
- . clone ( )
793
- }
781
+ ( None , Some ( non_witness_utxo) ) => non_witness_utxo
782
+ . output
783
+ . get ( txin. previous_output . vout as usize )
784
+ . ok_or ( UtxoUpdateError :: UtxoCheck ) ?
785
+ . script_pubkey
786
+ . clone ( ) ,
794
787
( Some ( witness_utxo) , Some ( non_witness_utxo) ) => {
795
788
if witness_utxo
796
789
!= non_witness_utxo
0 commit comments