Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

@TheBlueMatt TheBlueMatt commented Jan 23, 2026

Just a few more flags and a small cleanup.

Based on #4300

@TheBlueMatt TheBlueMatt requested a review from tnull January 23, 2026 02:21
@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jan 23, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @tnull! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@tnull tnull removed their request for review January 27, 2026 10:22
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Please re-request review once #4300 lands and this is rebased.

We jump through some hoops in order to pass a small list of objects
to `forward_htlcs` on a per-channel basis rather than per-HTLC.
Then, `forward_htlcs` builds a `PendingAddHTLCInfo` for each HTLC
for insertion. Worse, in some `forward_htlcs` callsites we're
actually starting with a `PendingAddHTLCInfo`, converting it to a
tuple, then back inside `forward_htlcs`.

Instead, here we just pass a list of built `PendingAddHTLCInfo`s to
`forward_htlcs`, cleaning up a good bit of code and even avoiding
an allocation of the HTLCs vec in many cases.
@TheBlueMatt TheBlueMatt force-pushed the 2026-01-intercept-by-source-v2 branch from b793c1e to 79952e1 Compare January 28, 2026 14:11
@TheBlueMatt TheBlueMatt requested a review from tnull January 28, 2026 14:11
@TheBlueMatt
Copy link
Collaborator Author

Rebased.

It may be useful in some situations to select HTLCs for
interception based on the source channel in addition to the sink.
Here we add the ability to do so by adding new flags to
`HTLCInterceptionFlags`.
@TheBlueMatt TheBlueMatt force-pushed the 2026-01-intercept-by-source-v2 branch from 79952e1 to 779fce3 Compare January 28, 2026 14:14
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.

3 participants