]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Document when `Events::PaymentSent::pending_fee_msat` is `Some` 2024-06-doc-fee-present
authorMatt Corallo <git@bluematt.me>
Mon, 17 Jun 2024 13:53:20 +0000 (13:53 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 17 Jun 2024 13:54:20 +0000 (13:54 +0000)
lightning/src/events/mod.rs
lightning/src/ln/outbound_payment.rs

index a1d1b3aa572470bda0bf984a7f07380648ad8e1a..887851864c97e84f62a7502673cd37e2259d316a 100644 (file)
@@ -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<u64>,
        },
index 3ae128cb3bbe97f37016d0447fed25384ebf3dba..0b8819aa0c6dbd47e1b3e2f692079a19526a62da 100644 (file)
@@ -71,7 +71,7 @@ pub(crate) enum PendingOutboundPayment {
                keysend_preimage: Option<PaymentPreimage>,
                custom_tlvs: Vec<(u64, Vec<u8>)>,
                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<u64>,
                /// The total payment amount across all paths, used to verify that a retry is not overpaying.
                total_msat: u64,