[[package]]
name = "lightning"
version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
dependencies = [
"bitcoin",
]
[[package]]
name = "lightning-background-processor"
version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
dependencies = [
"bitcoin",
"lightning",
[[package]]
name = "lightning-block-sync"
version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
dependencies = [
"bitcoin",
"chunked_transfer",
[[package]]
name = "lightning-net-tokio"
version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
dependencies = [
"bitcoin",
"lightning",
[[package]]
name = "lightning-persister"
version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
dependencies = [
"bitcoin",
"libc",
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-# lightning-background-processor = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
-lightning-background-processor = { path = "../rust-lightning/background-processor" }
+lightning-background-processor = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
+# lightning-background-processor = { path = "../rust-lightning/background-processor" }
base64 = "0.13.0"
bitcoin = "0.26"
bitcoin-bech32 = "0.7"
bech32 = "0.7"
hex = "0.3"
-# lightning = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
-lightning = { path = "../rust-lightning/lightning" }
-# lightning-block-sync = { git = "https://github.com/rust-bitcoin/rust-lightning", features = ["rpc-client"], rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
-lightning-block-sync = { path = "../rust-lightning/lightning-block-sync", features = ["rpc-client"] }
+lightning = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
+# lightning = { path = "../rust-lightning/lightning" }
+lightning-block-sync = { git = "https://github.com/rust-bitcoin/rust-lightning", features = ["rpc-client"], rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
+# lightning-block-sync = { path = "../rust-lightning/lightning-block-sync", features = ["rpc-client"] }
lightning-invoice = { git = "https://github.com/rust-bitcoin/rust-lightning-invoice", rev = "aa3a57b9dca5205fa25fa333a2db165d7e77b3b0" }
-# lightning-net-tokio = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
-lightning-net-tokio = { path = "../rust-lightning/lightning-net-tokio" }
-# lightning-persister = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "32f6205848806a3b2876a2ae36b1db7d5fa22f7d" }
-lightning-persister = { path = "../rust-lightning/lightning-persister" }
+lightning-net-tokio = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
+# lightning-net-tokio = { path = "../rust-lightning/lightning-net-tokio" }
+lightning-persister = { git = "https://github.com/rust-bitcoin/rust-lightning", rev = "6fcac8bc65ed6d372e0b8c367e9934c754f99ff3" }
+# lightning-persister = { path = "../rust-lightning/lightning-persister" }
time = "0.2"
rand = "0.4"
serde_json = { version = "1.0" }
Event::PendingHTLCsForwardable { time_forwardable } => {
let forwarding_channel_manager = loop_channel_manager.clone();
tokio::spawn(async move {
- let min = time_forwardable.as_secs();
- let seconds_to_sleep = thread_rng().gen_range(min, min * 5);
- tokio::time::sleep(Duration::from_secs(seconds_to_sleep)).await;
+ let min = time_forwardable.as_millis() as u64;
+ let millis_to_sleep = thread_rng().gen_range(min, min * 5) as u64;
+ tokio::time::sleep(Duration::from_millis(millis_to_sleep)).await;
forwarding_channel_manager.process_pending_htlc_forwards();
});
}