@@ -34,7 +34,7 @@ pub struct PsbtParams {
3434 pub ( crate ) drain_wallet : bool ,
3535 pub ( crate ) coin_selection : SelectionStrategy ,
3636 pub ( crate ) canonical_params : CanonicalizationParams ,
37- pub ( crate ) utxo_filter : Option < UtxoFilter > ,
37+ pub ( crate ) utxo_filter : UtxoFilter ,
3838
3939 // PSBT
4040 pub ( crate ) version : Option < Version > ,
@@ -57,7 +57,7 @@ impl Default for PsbtParams {
5757 drain_wallet : Default :: default ( ) ,
5858 coin_selection : Default :: default ( ) ,
5959 canonical_params : Default :: default ( ) ,
60- utxo_filter : None ,
60+ utxo_filter : Default :: default ( ) ,
6161 version : Default :: default ( ) ,
6262 locktime : Default :: default ( ) ,
6363 fallback_sequence : Default :: default ( ) ,
@@ -173,7 +173,7 @@ impl PsbtParams {
173173 where
174174 F : Fn ( & FullTxOut < ConfirmationBlockTime > ) -> bool + Send + Sync + ' static ,
175175 {
176- self . utxo_filter = Some ( UtxoFilter ( Arc :: new ( exclude) ) ) ;
176+ self . utxo_filter = UtxoFilter ( Arc :: new ( exclude) ) ;
177177 self
178178 }
179179
@@ -229,6 +229,12 @@ pub(crate) struct UtxoFilter(
229229 pub Arc < dyn Fn ( & FullTxOut < ConfirmationBlockTime > ) -> bool + Send + Sync > ,
230230) ;
231231
232+ impl Default for UtxoFilter {
233+ fn default ( ) -> Self {
234+ Self ( Arc :: new ( |_| false ) )
235+ }
236+ }
237+
232238impl fmt:: Debug for UtxoFilter {
233239 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
234240 write ! ( f, "UtxoFilter" )
0 commit comments