From: Valentine Wallace Date: Wed, 14 Jul 2021 20:32:54 +0000 (-0400) Subject: Update to RL upstream 0.0.99 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=9c10e5533db6829deeaf26f396fc5dd493baad6c;p=ldk-sample Update to RL upstream 0.0.99 --- diff --git a/Cargo.lock b/Cargo.lock index abb8455..6b381d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,5 +1,7 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "autocfg" version = "1.0.1" @@ -256,16 +258,16 @@ checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" [[package]] name = "lightning" -version = "0.0.98" -source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213" +version = "0.0.99" +source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#afae12ea1e610634f90335443e3fe9f126bf5551" dependencies = [ "bitcoin", ] [[package]] name = "lightning-background-processor" -version = "0.0.98" -source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213" +version = "0.0.99" +source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#afae12ea1e610634f90335443e3fe9f126bf5551" dependencies = [ "bitcoin", "lightning", @@ -274,8 +276,8 @@ dependencies = [ [[package]] name = "lightning-block-sync" -version = "0.0.98" -source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213" +version = "0.0.99" +source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#afae12ea1e610634f90335443e3fe9f126bf5551" dependencies = [ "bitcoin", "chunked_transfer", @@ -287,8 +289,8 @@ dependencies = [ [[package]] name = "lightning-invoice" -version = "0.6.0" -source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213" +version = "0.7.0" +source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#afae12ea1e610634f90335443e3fe9f126bf5551" dependencies = [ "bech32 0.7.2", "bitcoin_hashes", @@ -299,8 +301,8 @@ dependencies = [ [[package]] name = "lightning-net-tokio" -version = "0.0.98" -source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213" +version = "0.0.99" +source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#afae12ea1e610634f90335443e3fe9f126bf5551" dependencies = [ "bitcoin", "lightning", @@ -309,8 +311,8 @@ dependencies = [ [[package]] name = "lightning-persister" -version = "0.0.98" -source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#294009969aef617df4184ff41ef6daa5a445f213" +version = "0.0.99" +source = "git+https://github.com/rust-bitcoin/rust-lightning?branch=main#afae12ea1e610634f90335443e3fe9f126bf5551" dependencies = [ "bitcoin", "libc", diff --git a/Cargo.toml b/Cargo.toml index 9b4fd9c..414d338 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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.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" } +lightning = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" } +lightning-block-sync = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main", features = [ "rpc-client" ] } +lightning-invoice = { version = "0.7", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" } +lightning-net-tokio = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" } +lightning-persister = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" } +lightning-background-processor = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" } base64 = "0.13.0" bitcoin = "0.26" diff --git a/src/cli.rs b/src/cli.rs index b69f9af..47106a0 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -401,7 +401,7 @@ fn list_channels(channel_manager: Arc) { } println!( "\t\tpeer_pubkey: {},", - hex_utils::hex_str(&chan_info.remote_network_id.serialize()) + hex_utils::hex_str(&chan_info.counterparty.node_id.serialize()) ); if let Some(id) = chan_info.short_channel_id { println!("\t\tshort_channel_id: {},", id); diff --git a/src/main.rs b/src/main.rs index cba93f6..d24fcad 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,11 +19,10 @@ use lightning::chain; use lightning::chain::chaininterface::{BroadcasterInterface, ConfirmationTarget, FeeEstimator}; use lightning::chain::chainmonitor; use lightning::chain::keysinterface::{InMemorySigner, KeysInterface, KeysManager}; -use lightning::chain::Filter; -use lightning::chain::Watch; +use lightning::chain::{BestBlock, Filter, Watch}; use lightning::ln::channelmanager; use lightning::ln::channelmanager::{ - BestBlock, ChainParameters, ChannelManagerReadArgs, SimpleArcChannelManager, + ChainParameters, ChannelManagerReadArgs, SimpleArcChannelManager, }; use lightning::ln::peer_handler::{MessageHandler, SimpleArcPeerManager}; use lightning::ln::{PaymentHash, PaymentPreimage, PaymentSecret}; @@ -552,7 +551,7 @@ async fn start_ldk() { Ok(mut info) => { for (pubkey, peer_addr) in info.drain() { for chan_info in channel_manager.list_channels() { - if pubkey == chan_info.remote_network_id { + if pubkey == chan_info.counterparty.node_id { let _ = cli::connect_peer_if_necessary(pubkey, peer_addr, peer_manager.clone()) .await;