1
0

create a trampoline onion when directly paying a trampoline node

This commit is contained in:
ThomasV
2024-02-22 13:03:53 +01:00
parent 85ea2dfc48
commit 777c2ffb23
2 changed files with 26 additions and 32 deletions

View File

@@ -267,7 +267,9 @@ def create_trampoline_route(
# Add final edge. note: eclair requires an encrypted t-onion blob even in legacy case.
# Also needed for fees for last TF!
_extend_trampoline_route(route, end_node=invoice_pubkey, trampoline_fee_level=trampoline_fee_level)
if route[-1].end_node != invoice_pubkey:
_extend_trampoline_route(route, end_node=invoice_pubkey, trampoline_fee_level=trampoline_fee_level)
# check that we can pay amount and fees
if not is_route_within_budget(
route=route,