From: Matt Corallo Date: Fri, 13 Aug 2021 19:26:57 +0000 (+0000) Subject: Update to latest upstream rust-lightning, bumping deps X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=82c9d329d0db81a8e96240e5ccd6c965454919c5;p=ldk-sample Update to latest upstream rust-lightning, bumping deps --- diff --git a/Cargo.toml b/Cargo.toml index 414d338..e71926d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,9 @@ lightning-persister = { version = "0.0.99", git = "https://github.com/rust-bitco lightning-background-processor = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" } base64 = "0.13.0" -bitcoin = "0.26" -bitcoin-bech32 = "0.7" -bech32 = "0.7" +bitcoin = "0.27" +bitcoin-bech32 = "0.12" +bech32 = "0.8" hex = "0.3" futures = "0.3" diff --git a/src/main.rs b/src/main.rs index 57f0bb2..0229873 100644 --- a/src/main.rs +++ b/src/main.rs @@ -224,6 +224,23 @@ async fn handle_ldk_events( payment.status = HTLCStatus::Failed; } } + Event::PaymentForwarded { fee_earned_msat, claim_from_onchain_tx } => { + let from_onchain_str = if claim_from_onchain_tx { + "from onchain downstream claim" + } else { + "from HTLC fulfill message" + }; + if let Some(fee_earned) = fee_earned_msat { + println!( + "\nEVENT: Forwarded payment, earning {} msat {}", + fee_earned, from_onchain_str + ); + } else { + println!("\nEVENT: Forwarded payment, claiming onchain {}", from_onchain_str); + } + print!("> "); + io::stdout().flush().unwrap(); + } Event::PendingHTLCsForwardable { time_forwardable } => { let forwarding_channel_manager = channel_manager.clone(); tokio::spawn(async move {