]> git.bitcoin.ninja Git - ldk-sample/commitdiff
Update to RL master and fix PendingHTLCsForwardable
authorValentine Wallace <vwallace@protonmail.com>
Tue, 30 Mar 2021 18:56:55 +0000 (14:56 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Mon, 3 May 2021 22:31:01 +0000 (18:31 -0400)
Cargo.lock
Cargo.toml
src/main.rs

index 7eec170665e7c7f52cdde1123b2ed60a9ac8a0ca..1fd4f83e2b23ff2d28d33ca4d53acf39e90072aa 100644 (file)
@@ -256,6 +256,7 @@ checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
 [[package]]
 name = "lightning"
 version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
 dependencies = [
  "bitcoin",
 ]
@@ -263,6 +264,7 @@ dependencies = [
 [[package]]
 name = "lightning-background-processor"
 version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
 dependencies = [
  "bitcoin",
  "lightning",
@@ -272,6 +274,7 @@ dependencies = [
 [[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",
@@ -295,6 +298,7 @@ dependencies = [
 [[package]]
 name = "lightning-net-tokio"
 version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
 dependencies = [
  "bitcoin",
  "lightning",
@@ -304,6 +308,7 @@ dependencies = [
 [[package]]
 name = "lightning-persister"
 version = "0.0.13"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?rev=6fcac8bc65ed6d372e0b8c367e9934c754f99ff3#6fcac8bc65ed6d372e0b8c367e9934c754f99ff3"
 dependencies = [
  "bitcoin",
  "libc",
index 0b8434ce4e75b700b4fcda76b09fa747200473ab..4ce68dfff7c961d450bc4f3bee28ea993bdc3d3c 100644 (file)
@@ -8,22 +8,22 @@ edition = "2018"
 # 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" }
index ab9508672d6483ac82384eef39fa49d3492a62d7..493a07e5be058086ce898004e2026b6a629a404d 100644 (file)
@@ -235,9 +235,9 @@ async fn handle_ldk_events(
                                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();
                                        });
                                }