diff --git a/src/main.rs b/src/main.rs index 94f2a9e..0cf1ce9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -186,13 +186,15 @@ pub(crate) type OutputSweeper = ldk_sweep::OutputSweeper< Arc, >; +struct OutputSweeperWrapper(Arc); + async fn handle_ldk_events( channel_manager: Arc, bitcoind_client: &BitcoindClient, network_graph: &NetworkGraph, keys_manager: &KeysManager, bump_tx_event_handler: &BumpTxEventHandler, peer_manager: Arc, inbound_payments: Arc>, outbound_payments: Arc>, fs_store: Arc, - output_sweeper: Arc, network: Network, event: Event, + output_sweeper: OutputSweeperWrapper, network: Network, event: Event, ) { match event { Event::FundingGenerationReady { @@ -476,7 +478,7 @@ async fn handle_ldk_events( }); }, Event::SpendableOutputs { outputs, channel_id } => { - output_sweeper.track_spendable_outputs(outputs, channel_id, false, None).unwrap(); + output_sweeper.0.track_spendable_outputs(outputs, channel_id, false, None).unwrap(); }, Event::ChannelPending { channel_id, counterparty_node_id, .. } => { println!( @@ -976,7 +978,7 @@ async fn start_ldk() { inbound_payments_event_listener, outbound_payments_event_listener, fs_store_event_listener, - output_sweeper_event_listener, + OutputSweeperWrapper(output_sweeper_event_listener), network, event, )