Browse Source

trampoline MPP: handle direct payment to trampoline node

patch-4
ThomasV 2 years ago
parent
commit
5e77886b98
  1. 8
      electrum/lnworker.py

8
electrum/lnworker.py

@ -1673,6 +1673,14 @@ class LNWallet(LNWorker):
routes = [] routes = []
for trampoline_node_id, trampoline_parts in per_trampoline_channel_amounts.items(): for trampoline_node_id, trampoline_parts in per_trampoline_channel_amounts.items():
per_trampoline_amount = sum([x[1] for x in trampoline_parts]) per_trampoline_amount = sum([x[1] for x in trampoline_parts])
if trampoline_node_id == invoice_pubkey:
trampoline_route = None
trampoline_onion = None
per_trampoline_secret = payment_secret
per_trampoline_amount_with_fees = amount_msat
per_trampoline_cltv_delta = min_cltv_expiry
per_trampoline_fees = 0
else:
trampoline_route, trampoline_onion, per_trampoline_amount_with_fees, per_trampoline_cltv_delta = create_trampoline_route_and_onion( trampoline_route, trampoline_onion, per_trampoline_amount_with_fees, per_trampoline_cltv_delta = create_trampoline_route_and_onion(
amount_msat=per_trampoline_amount, amount_msat=per_trampoline_amount,
total_msat=final_total_msat, total_msat=final_total_msat,

Loading…
Cancel
Save