1
0

trigger payment_failed only once on htlc timeout tx failing

This commit is contained in:
f321x
2025-04-07 13:00:29 +02:00
parent 282c4561ff
commit cb4837f1b3

View File

@@ -2601,8 +2601,9 @@ class LNWallet(LNWorker):
else:
self.logger.info(f"received unknown htlc_failed, probably from previous session (phash={payment_hash.hex()})")
key = payment_hash.hex()
self.set_invoice_status(key, PR_UNPAID)
util.trigger_callback('payment_failed', self.wallet, key, '')
if self.get_payment_status(payment_hash) != PR_UNPAID:
self.set_invoice_status(key, PR_UNPAID)
util.trigger_callback('payment_failed', self.wallet, key, '')
if fw_key:
fw_htlcs = self.active_forwardings[fw_key]