Skip to content

Commit

Permalink
f fix 1.63 bug rust-lang#63033
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinewallace committed May 8, 2024
1 parent ac6462f commit 63d5ee1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,15 @@ pub(crate) type OutputSweeper = ldk_sweep::OutputSweeper<
Arc<KeysManager>,
>;

struct OutputSweeperWrapper(Arc<OutputSweeper>);

async fn handle_ldk_events(
channel_manager: Arc<ChannelManager>, bitcoind_client: &BitcoindClient,
network_graph: &NetworkGraph, keys_manager: &KeysManager,
bump_tx_event_handler: &BumpTxEventHandler, peer_manager: Arc<PeerManager>,
inbound_payments: Arc<Mutex<InboundPaymentInfoStorage>>,
outbound_payments: Arc<Mutex<OutboundPaymentInfoStorage>>, fs_store: Arc<FilesystemStore>,
output_sweeper: Arc<OutputSweeper>, network: Network, event: Event,
output_sweeper: OutputSweeperWrapper, network: Network, event: Event,
) {
match event {
Event::FundingGenerationReady {
Expand Down Expand Up @@ -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!(
Expand Down Expand Up @@ -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,
)
Expand Down

0 comments on commit 63d5ee1

Please sign in to comment.