trigger payment_failed only once on htlc timeout tx failing
This commit is contained in:
@@ -2601,8 +2601,9 @@ class LNWallet(LNWorker):
|
|||||||
else:
|
else:
|
||||||
self.logger.info(f"received unknown htlc_failed, probably from previous session (phash={payment_hash.hex()})")
|
self.logger.info(f"received unknown htlc_failed, probably from previous session (phash={payment_hash.hex()})")
|
||||||
key = payment_hash.hex()
|
key = payment_hash.hex()
|
||||||
self.set_invoice_status(key, PR_UNPAID)
|
if self.get_payment_status(payment_hash) != PR_UNPAID:
|
||||||
util.trigger_callback('payment_failed', self.wallet, key, '')
|
self.set_invoice_status(key, PR_UNPAID)
|
||||||
|
util.trigger_callback('payment_failed', self.wallet, key, '')
|
||||||
|
|
||||||
if fw_key:
|
if fw_key:
|
||||||
fw_htlcs = self.active_forwardings[fw_key]
|
fw_htlcs = self.active_forwardings[fw_key]
|
||||||
|
|||||||
Reference in New Issue
Block a user