Skip to content

Commit c41c202

Browse files
a-mpcharik-so
andcommitted
Enforce Trampoline constraints
We add a `check_trampoline_constraints` similar to `check_blinded_path_constraints` that compares the Trampoline onion's amount and CLTV values to the limitations imposed by the outer onion. We also add the expected errors by the spec: `TemporaryTrampolineFailure`, `TrampolineFeeOrExpiryInsufficient` and `UnknownNextTrampoline` to be used when encountering errors during forwarding or constraint validation. Finally, we add and modify the following tests: - Modified the unblinded receive to validate when receiving amount less than expected - Modified test with wrong CLTV parameters that now fails with new enforcement of CLTV limits - Add unblinded receive test that forces trampoline onion's CLTV to be greater than the outer onion packet Note that there are some TODOs to be fixed in following commits as we need the full trampoline forwarding feature to effectively test all cases. Co-authored-by: Arik Sosman <[email protected]>
1 parent 381416a commit c41c202

File tree

4 files changed

+557
-18
lines changed

4 files changed

+557
-18
lines changed

0 commit comments

Comments
 (0)