Skip to content

lnworker: add sanity check to trampoline forwarding - #10902

Open
SomberNight wants to merge 1 commit into
spesmilo:masterfrom
SomberNight:202608_trampoline_fwd_sanity_check
Open

lnworker: add sanity check to trampoline forwarding#10902
SomberNight wants to merge 1 commit into
spesmilo:masterfrom
SomberNight:202608_trampoline_fwd_sanity_check

Conversation

@SomberNight

Copy link
Copy Markdown
Member

These new asserts should not be triggered unless there are bugs in the code.
Which there are.
(still the asserts are not intended as primary checks, just defense-in-depth)

These new asserts should not be triggered unless there are bugs in the code.
Which there are.
(still the asserts are not intended as primary checks, just defense-in-depth)
@SomberNight
SomberNight force-pushed the 202608_trampoline_fwd_sanity_check branch from 8527509 to 4cca7da Compare August 27, 2026 16:56
Comment thread electrum/lnworker.py
f"RHASH corresponds to payreq we created. {payment_hash.hex()=}")
raise OnionRoutingFailure(code=OnionFailureCode.TEMPORARY_NODE_FAILURE, data=b'')

assert total_msat >= amt_to_forward # sanity check: money_in >= money_out

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add closest_inc_cltv_abs >= out_cltv_abs ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants