Uh oh!
There was an error while loading. Please reload this page.
Support HTLC interception by source channel - #4338
Conversation
👋 Thanks for assigning @tnull as a reviewer! |
ldk-reviews-bot
commented
Jan 26, 2026
🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. |
b793c1e to
79952e1CompareTheBlueMatt
commented
Jan 28, 2026
Rebased. |
79952e1 to
779fce3Compare
tnull
left a comment
There was a problem hiding this comment.
Seems CI is very unhappy as this doesn't build currently.
ldk-reviews-bot
commented
Jan 29, 2026
👋 The first review has been submitted! Do you think this PR is ready for a second reviewer? If so, click here to assign a second reviewer. |
779fce3 to
0bf2200CompareTheBlueMatt
commented
Jan 29, 2026
Oops, silent conflict. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #4338 +/- ##
==========================================
- Coverage 86.09% 85.89% -0.20%
==========================================
Files 156 156 Lines 103623 103958 +335 Branches 103623 103958 +335 ==========================================
+ Hits 89211 89299 +88 - Misses 11895 12139 +244 - Partials 2517 2520 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ldk-reviews-bot
commented
Jan 31, 2026
🔔 1st Reminder Hey @tnull! This PR has been waiting for your review. |
ldk-reviews-bot
commented
Feb 2, 2026
🔔 2nd Reminder Hey @tnull! This PR has been waiting for your review. |
elnosh
left a comment
There was a problem hiding this comment.
rustfmt is unhappy but code changes look good to me
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ldk-reviews-bot
commented
Feb 4, 2026
🔔 3rd Reminder Hey @tnull! This PR has been waiting for your review. |
ldk-reviews-bot
commented
Feb 7, 2026
🔔 4th Reminder Hey @tnull! This PR has been waiting for your review. |
0bf2200 to
f6ecc61Compareldk-reviews-bot
commented
Feb 9, 2026
🔔 5th Reminder Hey @tnull! This PR has been waiting for your review. |
ldk-reviews-bot
commented
Feb 11, 2026
🔔 6th Reminder Hey @tnull! This PR has been waiting for your review. |
f6ecc61 to
c4ae026CompareTheBlueMatt
commented
Feb 12, 2026
Squashed without any further changes. |
ldk-reviews-bot
commented
Feb 12, 2026
✅ Added second reviewer: @tankyleo |
ldk-reviews-bot
commented
Feb 16, 2026
🔔 1st Reminder Hey @tankyleo! This PR has been waiting for your review. |
TheBlueMatt
commented
Feb 17, 2026
Rebased to address conflict. |
c4ae026 to
ec84d55CompareWe 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.
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`.
ec84d55 to
9a9531fCompareTheBlueMatt
commented
Feb 18, 2026
Grr, rebase broke rustfmt: $ git diff-tree -U1 ec84d5549 9a9531f3c
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index a013b1905d..b417e023f4 100644
--- a/lightning/src/ln/channelmanager.rs+++ b/lightning/src/ln/channelmanager.rs@@ -9578,4 +9578,3 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
user_channel_id: u128, unbroadcasted_batch_funding_txid: Option<Txid>,
- update_actions: Vec<MonitorUpdateCompletionAction>,- htlc_forwards: Vec<PendingAddHTLCInfo>,+ update_actions: Vec<MonitorUpdateCompletionAction>, htlc_forwards: Vec<PendingAddHTLCInfo>,
decode_update_add_htlcs: Option<(u64, Vec<msgs::UpdateAddHTLC>)>, |
Uh oh!
There was an error while loading. Please reload this page.
Just a few more flags and a small cleanup.
Based on #4300