From d36e877eb8d7567471f5a7ccc6fb6b120c00ada1 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 18 Mar 2025 19:25:18 +0000 Subject: [PATCH] lnworker: comment re hist: if paying MPP, amt and fee might be shifted a bit confusing behaviour --- electrum/lnworker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index 160935c49..5ae8eaca3 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -1069,6 +1069,10 @@ class LNWallet(LNWorker): continue key = payment_hash.hex() info = self.get_payment_info(payment_hash) + # note: just after successfully paying an invoice using MPP, amount and fee values might be shifted + # temporarily: the amount only considers 'settled' htlcs (see plist above), but we might also + # have some inflight htlcs still. Until all relevant htlcs settle, the amount will be lower than + # expected and the fee higher (the inflight htlcs will be effectively counted as fees). direction, amount_msat, fee_msat, timestamp = self.get_payment_value(info, plist) label = self.wallet.get_label_for_rhash(key) if not label and direction == PaymentDirection.FORWARDING: