1
0

Merge pull request #9427 from f321x/limit_pay_to_node_attempts

Limit payment attempts if client uses trampoline
This commit is contained in:
ThomasV
2025-01-15 11:36:58 +01:00
committed by GitHub

View File

@@ -1487,6 +1487,9 @@ class LNWallet(LNWorker):
self.wallet.set_label(key, lnaddr.get_description())
self.set_invoice_status(key, PR_INFLIGHT)
budget = PaymentFeeBudget.default(invoice_amount_msat=amount_to_pay, config=self.config)
if attempts is None and self.uses_trampoline():
# we don't expect lots of failed htlcs with trampoline, so we can fail sooner
attempts = 30
success = False
try:
await self.pay_to_node(