@@ -90,6 +90,7 @@ impl WalletSyncStatus {
9090/// Setting an external source provides more accurate, per-target estimates
9191/// from a mempool-aware server.
9292#[ derive( Debug , Clone ) ]
93+ #[ cfg_attr( feature = "uniffi" , derive( uniffi:: Enum ) ) ]
9394pub enum FeeSourceConfig {
9495 /// Use an Esplora HTTP server for fee rate estimation.
9596 Esplora ( String ) ,
@@ -205,7 +206,7 @@ impl ChainSource {
205206 fee_estimator : Arc < OnchainFeeEstimator > , tx_broadcaster : Arc < Broadcaster > ,
206207 kv_store : Arc < DynStore > , config : Arc < Config > , logger : Arc < Logger > ,
207208 node_metrics : Arc < RwLock < NodeMetrics > > ,
208- ) -> ( Self , Option < BestBlock > ) {
209+ ) -> Result < ( Self , Option < BestBlock > ) , Error > {
209210 let cbf_chain_source = CbfChainSource :: new (
210211 peers,
211212 sync_config,
@@ -215,10 +216,10 @@ impl ChainSource {
215216 config,
216217 Arc :: clone ( & logger) ,
217218 node_metrics,
218- ) ;
219+ ) ? ;
219220 let kind = ChainSourceKind :: Cbf ( cbf_chain_source) ;
220221 let registered_txids = Mutex :: new ( Vec :: new ( ) ) ;
221- ( Self { kind, registered_txids, tx_broadcaster, logger } , None )
222+ Ok ( ( Self { kind, registered_txids, tx_broadcaster, logger } , None ) )
222223 }
223224
224225 pub ( crate ) fn start ( & self , runtime : Arc < Runtime > ) -> Result < ( ) , Error > {
0 commit comments