From f2005ba79db396bb5a7749c3bd7a64138242f284 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 17 Jun 2024 13:53:20 +0000 Subject: [PATCH] Document when `Events::PaymentSent::pending_fee_msat` is `Some` --- lightning/src/events/mod.rs | 2 ++ lightning/src/ln/outbound_payment.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs index a1d1b3aa5..887851864 100644 --- a/lightning/src/events/mod.rs +++ b/lightning/src/events/mod.rs @@ -789,6 +789,8 @@ pub enum Event { /// If the recipient or an intermediate node misbehaves and gives us free money, this may /// overstate the amount paid, though this is unlikely. /// + /// This is only `None` for payments initiated on LDK versions prior to 0.0.103. + /// /// [`Route::get_total_fees`]: crate::routing::router::Route::get_total_fees fee_paid_msat: Option, }, diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 3ae128cb3..0b8819aa0 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -71,7 +71,7 @@ pub(crate) enum PendingOutboundPayment { keysend_preimage: Option, custom_tlvs: Vec<(u64, Vec)>, pending_amt_msat: u64, - /// Used to track the fee paid. Only present if the payment was serialized on 0.0.103+. + /// Used to track the fee paid. Present iff the payment was serialized on 0.0.103+. pending_fee_msat: Option, /// The total payment amount across all paths, used to verify that a retry is not overpaying. total_msat: u64, -- 2.39.5