Update to RL upstream 0.0.98
authorValentine Wallace <vwallace@protonmail.com>
Fri, 11 Jun 2021 19:33:11 +0000 (15:33 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Fri, 11 Jun 2021 19:33:11 +0000 (15:33 -0400)
Cargo.lock
Cargo.toml
src/cli.rs

index 37e41e6d93c33f7ec3eed23a3bfa3873bcd78e71..abb8455f9d1abf332e9a3695e4af7cf2213f5583 100644 (file)
@@ -256,16 +256,16 @@ checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"
 
 [[package]]
 name = "lightning"
-version = "0.0.14"
-source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#499d84c165426b6f05bb414f5a49a7423eb9e0c5"
+version = "0.0.98"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213"
 dependencies = [
  "bitcoin",
 ]
 
 [[package]]
 name = "lightning-background-processor"
-version = "0.0.14"
-source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#499d84c165426b6f05bb414f5a49a7423eb9e0c5"
+version = "0.0.98"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213"
 dependencies = [
  "bitcoin",
  "lightning",
@@ -274,8 +274,8 @@ dependencies = [
 
 [[package]]
 name = "lightning-block-sync"
-version = "0.0.14"
-source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#499d84c165426b6f05bb414f5a49a7423eb9e0c5"
+version = "0.0.98"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213"
 dependencies = [
  "bitcoin",
  "chunked_transfer",
@@ -287,8 +287,8 @@ dependencies = [
 
 [[package]]
 name = "lightning-invoice"
-version = "0.5.0"
-source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#499d84c165426b6f05bb414f5a49a7423eb9e0c5"
+version = "0.6.0"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213"
 dependencies = [
  "bech32 0.7.2",
  "bitcoin_hashes",
@@ -299,8 +299,8 @@ dependencies = [
 
 [[package]]
 name = "lightning-net-tokio"
-version = "0.0.14"
-source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#499d84c165426b6f05bb414f5a49a7423eb9e0c5"
+version = "0.0.98"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213"
 dependencies = [
  "bitcoin",
  "lightning",
@@ -309,8 +309,8 @@ dependencies = [
 
 [[package]]
 name = "lightning-persister"
-version = "0.0.14"
-source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#499d84c165426b6f05bb414f5a49a7423eb9e0c5"
+version = "0.0.98"
+source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213"
 dependencies = [
  "bitcoin",
  "libc",
index 2ae52ea325a6d59c2152e512ab50a0435bc87c9a..9b4fd9cc1391f526e11d37f0b8f2ac3b8eda1af9 100644 (file)
@@ -8,12 +8,12 @@ edition = "2018"
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-lightning = { version = "0.0.14", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
-lightning-block-sync = { version = "0.0.14", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main", features = [ "rpc-client" ] }
-lightning-invoice = { version = "0.5", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
-lightning-net-tokio = { version = "0.0.14", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
-lightning-persister = { version = "0.0.14", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
-lightning-background-processor = { version = "0.0.14", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
+lightning = { version = "0.0.98", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
+lightning-block-sync = { version = "0.0.98", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main", features = [ "rpc-client" ] }
+lightning-invoice = { version = "0.6", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
+lightning-net-tokio = { version = "0.0.98", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
+lightning-persister = { version = "0.0.98", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
+lightning-background-processor = { version = "0.0.98", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
 
 base64 = "0.13.0"
 bitcoin = "0.26"
index 5d778e8754975f085d10605c047c37abf4387596..7e122c39a2b6a402802b95a56fc2eb0a6ea59280 100644 (file)
@@ -13,7 +13,7 @@ use lightning::ln::msgs::NetAddress;
 use lightning::ln::{PaymentHash, PaymentSecret};
 use lightning::routing::network_graph::NetGraphMsgHandler;
 use lightning::routing::router;
-use lightning::routing::router::RouteHintHop;
+use lightning::routing::router::RouteHint;
 use lightning::util::config::UserConfig;
 use lightning_invoice::{utils, Currency, Invoice};
 use std::env;
@@ -227,11 +227,7 @@ pub(crate) async fn poll_for_user_input(
                                                        continue;
                                                }
                                        };
-                                       let mut route_hints = invoice.routes().clone();
-                                       let mut last_hops = Vec::new();
-                                       for hint in route_hints.drain(..) {
-                                               last_hops.push(hint[hint.len() - 1].clone());
-                                       }
+                                       let last_hops = invoice.route_hints();
 
                                        let amt_pico_btc = invoice.amount_pico_btc();
                                        if amt_pico_btc.is_none() {
@@ -541,7 +537,7 @@ fn open_channel(
 fn send_payment(
        payee: PublicKey, amt_msat: u64, final_cltv: u32, payment_hash: PaymentHash,
        payment_secret: Option<PaymentSecret>, payee_features: Option<InvoiceFeatures>,
-       route_hints: Vec<RouteHintHop>,
+       route_hints: Vec<&RouteHint>,
        router: Arc<NetGraphMsgHandler<Arc<dyn chain::Access + Send + Sync>, Arc<FilesystemLogger>>>,
        channel_manager: Arc<ChannelManager>, payment_storage: PaymentInfoStorage,
        logger: Arc<FilesystemLogger>,
@@ -556,7 +552,7 @@ fn send_payment(
                &payee,
                payee_features,
                Some(&first_hops.iter().collect::<Vec<_>>()),
-               &route_hints.iter().collect::<Vec<_>>(),
+               &route_hints,
                amt_msat,
                final_cltv,
                logger,