From 48c53053d6b9fa415081229a10d6da24ad0913aa Mon Sep 17 00:00:00 2001 From: f321x Date: Wed, 15 Jan 2025 10:44:01 +0100 Subject: [PATCH] don't inline logic and add comment --- electrum/lnworker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index e793e239b..8840d5aaf 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -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( @@ -1497,7 +1500,7 @@ class LNWallet(LNWorker): min_final_cltv_delta=min_final_cltv_delta, r_tags=r_tags, invoice_features=invoice_features, - attempts=20 if attempts is None and self.uses_trampoline() else attempts, + attempts=attempts, full_path=full_path, channels=channels, budget=budget,