Skip to content

Conversation

@TheBlueMatt
Copy link
Collaborator

In 60540f7 we renamed Event::PaymentClaimable::inbound_channel_ids back to via_channel_ids which was changed in
c62aa23. However, it was pointed out that while inbound_channel_ids was confusing, so was via_channel_ids (which can be easily interpreted as the hops that a payment took, rather than the last hops it took to get to us in an MPP payment).

Thus, here, we rename it yet again to receiving_channel_ids, which is hopefully less ambiguous.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Jul 29, 2025

👋 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.

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.

Simple enough, one question though

(4, amount_msat, required),
// Marked as legacy in version 0.2.0 for the same reason as `via_channel_id_legacy`;
// superseded by `via_user_channel_ids`.
(5, via_user_channel_id_legacy, option),
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, any reason why we rename it here, but still reference via_user_channel_id_legacy in impl MaybeReadable for Event?

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps this legacy field can just remain as-is considering it would maybe need a changelog entry if it were changed anyway?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cause my search-and-replace sucks :). Having the legacy field called something different seems confusing to me - its just an internal variable and the point is that its the same thing as the current/new field just a different encoding, so IMO should be named the same.

@ldk-reviews-bot
Copy link

👋 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.

In 60540f7 we renamed
`Event::PaymentClaimable::inbound_channel_ids` back to
`via_channel_ids` which was changed in
c62aa23. However, it was pointed
out that while `inbound_channel_ids` was confusing, so was
`via_channel_ids` (which can be easily interpreted as the hops
that a payment took, rather than the last hops it took to get to
us in an MPP payment).

Thus, here, we rename it yet again to `receiving_channel_ids`,
which is hopefully less ambiguous.
@TheBlueMatt TheBlueMatt force-pushed the 2025-07-rename-again branch from 98ecbfc to 52613a7 Compare July 29, 2025 13:02
@TheBlueMatt
Copy link
Collaborator Author

Sorry, missed one

$ git diff-tree -U1 98ecbfc96 52613a798
diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs
index 37cb34c600..2b71207356 100644
--- a/lightning/src/events/mod.rs
+++ b/lightning/src/events/mod.rs
@@ -2159,3 +2159,3 @@ impl MaybeReadable for Event {
 					let mut claim_deadline = None;
-					let mut via_user_channel_id_legacy = None;
+					let mut receiving_user_channel_id_legacy = None;
 					let mut onion_fields = None;
@@ -2170,3 +2170,3 @@ impl MaybeReadable for Event {
 						(4, amount_msat, required),
-						(5, via_user_channel_id_legacy, option),
+						(5, receiving_user_channel_id_legacy, option),
 						(6, _user_payment_id, option),
@@ -2194,3 +2194,3 @@ impl MaybeReadable for Event {
 							receiving_channel_id_legacy
-								.map(|chan_id| vec![(chan_id, via_user_channel_id_legacy)])
+								.map(|chan_id| vec![(chan_id, receiving_user_channel_id_legacy)])
 						})

Copy link
Contributor

@dunxen dunxen left a comment

Choose a reason for hiding this comment

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

Seems appropriate to me

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.

LGTM

@tnull tnull merged commit 6472eb6 into lightningdevkit:main Jul 29, 2025
21 of 23 checks passed
@codecov
Copy link

codecov bot commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.92%. Comparing base (bb48bbc) to head (52613a7).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
lightning/src/events/mod.rs 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3971      +/-   ##
==========================================
- Coverage   88.93%   88.92%   -0.01%     
==========================================
  Files         174      174              
  Lines      123875   123875              
  Branches   123875   123875              
==========================================
- Hits       110169   110162       -7     
- Misses      11253    11261       +8     
+ Partials     2453     2452       -1     
Flag Coverage Δ
fuzzing 22.62% <0.00%> (+0.44%) ⬆️
tests 88.75% <94.11%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

4 participants