]> git.bitcoin.ninja Git - ldk-sample/commitdiff
Update to v0.0.110
authorElias Rohrer <ero@tnull.de>
Wed, 27 Jul 2022 07:24:13 +0000 (09:24 +0200)
committerElias Rohrer <ero@tnull.de>
Thu, 28 Jul 2022 17:24:49 +0000 (19:24 +0200)
Cargo.lock
Cargo.toml
src/main.rs

index 492feca40fd5992d24cf730f4c4fc7a5f545ec01..6f07b3fe2d63f42a54895a9bc2b74d25b95d0b5f 100644 (file)
@@ -230,18 +230,18 @@ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
 
 [[package]]
 name = "lightning"
-version = "0.0.109"
+version = "0.0.110"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "740348ba79a57039390b13236e6a3d7fe5f5c1627702178b9c19cd397e45d07e"
+checksum = "2dce6da860338d5a9ddc3fd42432465310cfab93b342bbd23b41b7c1f7c509d3"
 dependencies = [
  "bitcoin",
 ]
 
 [[package]]
 name = "lightning-background-processor"
-version = "0.0.109"
+version = "0.0.110"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb6fed7a24f94ff2755bed7443ef637bc5dfb917738374a9669719ccc75aff18"
+checksum = "e8de9d0de42bb933ffb8d33c6b0a75302f08b35126bfc74398ba01ad0c201f8d"
 dependencies = [
  "bitcoin",
  "lightning",
@@ -250,9 +250,9 @@ dependencies = [
 
 [[package]]
 name = "lightning-block-sync"
-version = "0.0.109"
+version = "0.0.110"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "526e92067f3f034733619fbc38a0082590e0804a38ae9390bf217681a7ac00ac"
+checksum = "4cee1ad5df24c87e5d09a655af9d36e12c193961c908b71fd1a5fa39f01cfa0d"
 dependencies = [
  "bitcoin",
  "chunked_transfer",
@@ -264,9 +264,9 @@ dependencies = [
 
 [[package]]
 name = "lightning-invoice"
-version = "0.17.0"
+version = "0.18.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c87c47064c865a3e2f204837279a9a48c5f18ea4db8a56e813921793dc1f3cc5"
+checksum = "32aa02b7fd0bd95e40b6ca8d9d9232b162d5e23b41bd2bc42abe9e9c78d34d72"
 dependencies = [
  "bech32",
  "bitcoin_hashes",
@@ -277,9 +277,9 @@ dependencies = [
 
 [[package]]
 name = "lightning-net-tokio"
-version = "0.0.109"
+version = "0.0.110"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1726bdb0d82e53861e89d0d34c0a7a575bf64f874dcf276805fccb847c883728"
+checksum = "ce57d093fbc643835bc64c0501b52a3531d2511dcb1237d0495d68fea3adc47d"
 dependencies = [
  "bitcoin",
  "lightning",
@@ -288,9 +288,9 @@ dependencies = [
 
 [[package]]
 name = "lightning-persister"
-version = "0.0.109"
+version = "0.0.110"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dc72fee1a517de6dce3bf2a5817314e0b2f8c80bf7bb0bc52f7aaa654714292"
+checksum = "9abe8137de42431ed344f64821c12cf02f934c7869f5f8febaa1b3cb851e1fc1"
 dependencies = [
  "bitcoin",
  "libc",
@@ -300,9 +300,9 @@ dependencies = [
 
 [[package]]
 name = "lightning-rapid-gossip-sync"
-version = "0.0.109"
+version = "0.0.110"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bf4769cdd6024aef9d6c016afb70ea76ae572e6313216aac72f6a5b4f9f8ecb"
+checksum = "391732631b14f7a1d9dc84dc3f644484d9b73190a31087b3856505cf0525bea0"
 dependencies = [
  "bitcoin",
  "lightning",
index 74ce48b40325f7804d358fd00e039452389e0b39..475ea555ecf08a77e88b0b4b1e17bc8d0cf8676b 100644 (file)
@@ -8,13 +8,13 @@ edition = "2018"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-lightning = { version = "0.0.109", features = ["max_level_trace"] }
-lightning-block-sync = { version = "0.0.109", features = [ "rpc-client" ] }
-lightning-invoice = { version = "0.17" }
-lightning-net-tokio = { version = "0.0.109" }
-lightning-persister = { version = "0.0.109" }
-lightning-background-processor = { version = "0.0.109" }
-lightning-rapid-gossip-sync = { version = "0.0.109" }
+lightning = { version = "0.0.110", features = ["max_level_trace"] }
+lightning-block-sync = { version = "0.0.110", features = [ "rpc-client" ] }
+lightning-invoice = { version = "0.18" }
+lightning-net-tokio = { version = "0.0.110" }
+lightning-persister = { version = "0.0.110" }
+lightning-background-processor = { version = "0.0.110" }
+lightning-rapid-gossip-sync = { version = "0.0.110" }
 
 base64 = "0.13.0"
 bitcoin = "0.28.1"
index 08bedc70c1b0d4adc3b4bae3ead8def147eb6928..1fddf8b91b3226074560f88132c089f4c737eae0 100644 (file)
@@ -30,7 +30,7 @@ use lightning::routing::scoring::ProbabilisticScorer;
 use lightning::util::config::UserConfig;
 use lightning::util::events::{Event, PaymentPurpose};
 use lightning::util::ser::ReadableArgs;
-use lightning_background_processor::BackgroundProcessor;
+use lightning_background_processor::{BackgroundProcessor, GossipSync};
 use lightning_block_sync::init;
 use lightning_block_sync::poll;
 use lightning_block_sync::SpvClient;
@@ -39,7 +39,6 @@ use lightning_invoice::payment;
 use lightning_invoice::utils::DefaultRouter;
 use lightning_net_tokio::SocketDescriptor;
 use lightning_persister::FilesystemPersister;
-use lightning_rapid_gossip_sync::RapidGossipSync;
 use rand::{thread_rng, Rng};
 use std::collections::hash_map::Entry;
 use std::collections::HashMap;
@@ -111,9 +110,6 @@ pub(crate) type InvoicePayer<E> = payment::InvoicePayer<
 
 type Router = DefaultRouter<Arc<NetworkGraph>, Arc<FilesystemLogger>>;
 
-type GossipSync<P, G, A, L> =
-       lightning_background_processor::GossipSync<P, Arc<RapidGossipSync<G, L>>, G, A, L>;
-
 pub(crate) type NetworkGraph = gossip::NetworkGraph<Arc<FilesystemLogger>>;
 
 async fn handle_ldk_events(
@@ -245,6 +241,8 @@ async fn handle_ldk_events(
                }
                Event::PaymentPathSuccessful { .. } => {}
                Event::PaymentPathFailed { .. } => {}
+               Event::ProbeSuccessful { .. } => {}
+               Event::ProbeFailed { .. } => {}
                Event::PaymentFailed { payment_hash, .. } => {
                        print!(
                                "\nEVENT: Failed to send payment to payment hash {:?}: exhausted payment retry attempts",
@@ -315,6 +313,7 @@ async fn handle_ldk_events(
                        print!("> ");
                        io::stdout().flush().unwrap();
                }
+               Event::HTLCHandlingFailed { .. } => {}
                Event::PendingHTLCsForwardable { time_forwardable } => {
                        let forwarding_channel_manager = channel_manager.clone();
                        let min = time_forwardable.as_millis() as u64;
@@ -674,7 +673,7 @@ async fn start_ldk() {
                invoice_payer.clone(),
                chain_monitor.clone(),
                channel_manager.clone(),
-               GossipSync::P2P(gossip_sync.clone()),
+               GossipSync::p2p(gossip_sync.clone()),
                peer_manager.clone(),
                logger.clone(),
                Some(scorer.clone()),