1
0

lnworker: minor fix, follow-up fc4f995668

This commit is contained in:
ThomasV
2025-06-03 10:26:25 +02:00
parent 468f496f34
commit 94517fbc0e

View File

@@ -2643,7 +2643,7 @@ class LNWallet(LNWorker):
self.logger.info(f"received unknown htlc_failed, probably from previous session (phash={payment_hash.hex()})")
key = payment_hash.hex()
invoice = self.wallet.get_invoice(key)
if self.get_invoice_status(invoice) != PR_UNPAID:
if invoice and self.get_invoice_status(invoice) != PR_UNPAID:
self.set_invoice_status(key, PR_UNPAID)
util.trigger_callback('payment_failed', self.wallet, key, '')