From fc4f995668035d0e7f0f2e6314cf6efedba5f55d Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 2 Jun 2025 16:14:00 +0200 Subject: [PATCH] lnworker: fix invoice status in htlc_failed from previous session (status was remaining inflight) --- electrum/lnworker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index a534c9c7c..537859fef 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -2642,7 +2642,8 @@ class LNWallet(LNWorker): else: self.logger.info(f"received unknown htlc_failed, probably from previous session (phash={payment_hash.hex()})") key = payment_hash.hex() - if self.get_payment_status(payment_hash) != PR_UNPAID: + invoice = self.wallet.get_invoice(key) + if self.get_invoice_status(invoice) != PR_UNPAID: self.set_invoice_status(key, PR_UNPAID) util.trigger_callback('payment_failed', self.wallet, key, '')