Skip to content

Commit b7d4f0a

Browse files
Update to RL master and fix PendingHTLCsForwardable
1 parent ff5344a commit b7d4f0a

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

Cargo.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ edition = "2018"
88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
99

1010
[dependencies]
11-
# lightning-background-processor = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
12-
lightning-background-processor = { path = "../rust-lightning/background-processor" }
11+
lightning-background-processor = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
12+
# lightning-background-processor = { path = "../rust-lightning/background-processor" }
1313
base64 = "0.13.0"
1414
bitcoin = "0.26"
1515
bitcoin-bech32 = "0.7"
1616
bech32 = "0.7"
1717
hex = "0.3"
18-
# lightning = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
19-
lightning = { path = "../rust-lightning/lightning" }
20-
# lightning-block-sync = { git = "https://github.com/rust-bitcoin/rust-lightning", features = ["rpc-client"], rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
21-
lightning-block-sync = { path = "../rust-lightning/lightning-block-sync", features = ["rpc-client"] }
18+
lightning = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
19+
# lightning = { path = "../rust-lightning/lightning" }
20+
lightning-block-sync = { git = "https://github.com/rust-bitcoin/rust-lightning", features = ["rpc-client"], rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
21+
# lightning-block-sync = { path = "../rust-lightning/lightning-block-sync", features = ["rpc-client"] }
2222
lightning-invoice = { git = "https://github.com/rust-bitcoin/rust-lightning-invoice", rev = "aa3a57b9dca5205fa25fa333a2db165d7e77b3b0" }
23-
# lightning-net-tokio = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
24-
lightning-net-tokio = { path = "../rust-lightning/lightning-net-tokio" }
25-
# lightning-persister = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
26-
lightning-persister = { path = "../rust-lightning/lightning-persister" }
23+
lightning-net-tokio = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
24+
# lightning-net-tokio = { path = "../rust-lightning/lightning-net-tokio" }
25+
lightning-persister = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
26+
# lightning-persister = { path = "../rust-lightning/lightning-persister" }
2727
time = "0.2"
2828
rand = "0.4"
2929
serde_json = { version = "1.0" }

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ async fn handle_ldk_events(
235235
Event::PendingHTLCsForwardable { time_forwardable } => {
236236
let forwarding_channel_manager = loop_channel_manager.clone();
237237
tokio::spawn(async move {
238-
let min = time_forwardable.as_secs();
239-
let seconds_to_sleep = thread_rng().gen_range(min, min * 5);
240-
tokio::time::sleep(Duration::from_secs(seconds_to_sleep)).await;
238+
let min = time_forwardable.as_millis() as u64;
239+
let millis_to_sleep = thread_rng().gen_range(min, min * 5) as u64;
240+
tokio::time::sleep(Duration::from_millis(millis_to_sleep)).await;
241241
forwarding_channel_manager.process_pending_htlc_forwards();
242242
});
243243
}

0 commit comments

Comments
 (0)