Skip to content

Commit da99815

Browse files
committed
lnpeer: deduct JIT fees also for trampoline
1 parent fb566eb commit da99815

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

electrum/lnpeer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3095,7 +3095,7 @@ def _check_unfulfilled_htlc_set(
30953095

30963096
if trampoline_payment_key and trampoline_payment_key != payment_key:
30973097
# first stage of trampoline payment, the first stage must never get set COMPLETE
3098-
if amount_msat >= any_trampoline_onion.amt_to_forward:
3098+
if amount_msat >= (any_trampoline_onion.amt_to_forward - jit_opening_fees_msat):
30993099
# setting the parent key will mark the htlcs to be moved to the parent set
31003100
self.logger.debug(f"trampoline part complete. {len(mpp_set.htlcs)=}, "
31013101
f"{amount_msat=}. setting parent key: {trampoline_payment_key}")

0 commit comments

Comments
 (0)