Skip to content

Commit 46c606e

Browse files
Merge pull request lightningdevkit#29 from TheBlueMatt/main
Update to latest upstream rust-lightning, bumping deps
2 parents 22fb5d9 + fe7f9ed commit 46c606e

File tree

3 files changed

+61
-49
lines changed

3 files changed

+61
-49
lines changed

Cargo.lock

Lines changed: 41 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ lightning-persister = { version = "0.0.99", git = "https://github.com/rust-bitco
1616
lightning-background-processor = { version = "0.0.99", git = "https://github.com/rust-bitcoin/rust-lightning", branch = "main" }
1717

1818
base64 = "0.13.0"
19-
bitcoin = "0.26"
20-
bitcoin-bech32 = "0.7"
21-
bech32 = "0.7"
19+
bitcoin = "0.27"
20+
bitcoin-bech32 = "0.12"
21+
bech32 = "0.8"
2222
hex = "0.3"
2323

2424
futures = "0.3"

src/main.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,23 @@ async fn handle_ldk_events(
224224
payment.status = HTLCStatus::Failed;
225225
}
226226
}
227+
Event::PaymentForwarded { fee_earned_msat, claim_from_onchain_tx } => {
228+
let from_onchain_str = if claim_from_onchain_tx {
229+
"from onchain downstream claim"
230+
} else {
231+
"from HTLC fulfill message"
232+
};
233+
if let Some(fee_earned) = fee_earned_msat {
234+
println!(
235+
"\nEVENT: Forwarded payment, earning {} msat {}",
236+
fee_earned, from_onchain_str
237+
);
238+
} else {
239+
println!("\nEVENT: Forwarded payment, claiming onchain {}", from_onchain_str);
240+
}
241+
print!("> ");
242+
io::stdout().flush().unwrap();
243+
}
227244
Event::PendingHTLCsForwardable { time_forwardable } => {
228245
let forwarding_channel_manager = channel_manager.clone();
229246
tokio::spawn(async move {

0 commit comments

Comments
 (0)