Construct Trampoline onion from path.#2927
Construct Trampoline onion from path.#2927arik-so wants to merge 8 commits intolightningdevkit:mainfrom
Conversation
lightning/src/ln/msgs.rs
Outdated
| custom_tlvs: Vec<(u64, Vec<u8>)>, | ||
| sender_intended_htlc_amt_msat: u64, | ||
| cltv_expiry_height: u32, | ||
| trampoline_packet: Option<crate::onion_message::packet::Packet> |
There was a problem hiding this comment.
Shouldn't this be a different variant? ISTM it would clean up the accessing code if we call this a TrampolineForward because its really a forward, not have forwarding logic in handling the Receive variant.
There was a problem hiding this comment.
I have moved it to a separate variant, which indeed makes perfect sense.
lightning/src/ln/msgs.rs
Outdated
| amt_to_forward: u64, | ||
| outgoing_cltv_value: u32, | ||
| }, | ||
| // This should only be used for nested Trampoline onions |
There was a problem hiding this comment.
Then it should be in a separate struct, not in the same enum, no?
There was a problem hiding this comment.
This is still an onion payload, just in this case for an inner onion. The last payload will still be the Receive variant. I'm not 100% sure it makes sense to create a whole separate struct for that.
|
Thanks for the feedback, @TheBlueMatt! I'll update #2756 to reflect your recommendations. |
665ba99 to
e724cf4
Compare
|
Could we rebase this on #2906? Hard to evaluate the new |
|
Yeah, ish, but absent a Receive variant, it's gonna completely break, so I think once 2906 is in I'll need to rework this. Bastien has been very helpful with trampoline to blinded path serialization references, so I'll alter this PR to do that instead. |
e724cf4 to
a6609ab
Compare
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2927 +/- ##
==========================================
+ Coverage 89.42% 90.07% +0.64%
==========================================
Files 117 118 +1
Lines 96290 104861 +8571
Branches 96290 104861 +8571
==========================================
+ Hits 86109 94454 +8345
- Misses 7962 8246 +284
+ Partials 2219 2161 -58 ☔ View full report in Codecov by Sentry. |
a6609ab to
51539af
Compare
51539af to
32d7a1e
Compare
32d7a1e to
e768f53
Compare
No description provided.