From: Matt Corallo Date: Mon, 17 Jun 2024 13:53:20 +0000 (+0000) Subject: Document when `Events::PaymentSent::pending_fee_msat` is `Some` X-Git-Tag: v0.0.124-beta~77^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=f2005ba79db396bb5a7749c3bd7a64138242f284;p=rust-lightning Document when `Events::PaymentSent::pending_fee_msat` is `Some` --- 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,