Skip to content

Commit 071c9cd

Browse files
committed
f Account for PendingHTLCsForwardable being dropped
1 parent 29200da commit 071c9cd

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/event.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ use core::task::{Poll, Waker};
5959
use std::collections::VecDeque;
6060
use std::ops::Deref;
6161
use std::sync::{Arc, Condvar, Mutex};
62-
use std::time::Duration;
6362

6463
/// An event emitted by [`Node`], which should be handled by the user.
6564
///
@@ -1048,19 +1047,6 @@ where
10481047
liquidity_source.handle_htlc_handling_failed(failure_type);
10491048
}
10501049
},
1051-
LdkEvent::PendingHTLCsForwardable { time_forwardable } => {
1052-
let forwarding_channel_manager = self.channel_manager.clone();
1053-
let min = time_forwardable.as_millis() as u64;
1054-
1055-
let future = async move {
1056-
let millis_to_sleep = thread_rng().gen_range(min..min * 5) as u64;
1057-
tokio::time::sleep(Duration::from_millis(millis_to_sleep)).await;
1058-
1059-
forwarding_channel_manager.process_pending_htlc_forwards();
1060-
};
1061-
1062-
self.runtime.spawn_cancellable_background_task(future);
1063-
},
10641050
LdkEvent::SpendableOutputs { outputs, channel_id } => {
10651051
match self
10661052
.output_sweeper
@@ -1161,7 +1147,7 @@ where
11611147
}
11621148
}
11631149

1164-
let user_channel_id: u128 = rand::thread_rng().gen::<u128>();
1150+
let user_channel_id: u128 = thread_rng().gen::<u128>();
11651151
let allow_0conf = self.config.trusted_peers_0conf.contains(&counterparty_node_id);
11661152
let mut channel_override_config = None;
11671153
if let Some((lsp_node_id, _)) = self

0 commit comments

Comments
 (0)