From 9f9919e35191c7f85ac6a1ec81508eaa12ca076d Mon Sep 17 00:00:00 2001 From: ThomasV Date: Wed, 14 May 2025 12:25:55 +0200 Subject: [PATCH] available_to_spend: check too_many_htlcs partial fix for #8857 (this should at least fix the trampoline case) --- electrum/lnchannel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py index 012a703d6..9336be484 100644 --- a/electrum/lnchannel.py +++ b/electrum/lnchannel.py @@ -1553,6 +1553,8 @@ class Channel(AbstractChannel): ) max_send_msat = min(max_send_msat, self.remaining_max_inflight(receiver)) + if self.too_many_htlcs(sender): + max_send_msat = 0 max_send_msat = max(max_send_msat, 0) return max_send_msat