Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CandidateRouteHop enum variant fields into structs #2802

Merged
merged 1 commit into from Jan 8, 2024

Conversation

TheBlueMatt
Copy link
Collaborator

The bindings generator struggles a bit with the references in enum variant fields in CandidateRouteHop. While we could probably fix this, its much eaiser (and less risky) to inline the enum variant fields from CandidateRouteHop into structs. This also lets us make some of the fields non-public, which seems better at least for the opaque hint_idx in the blinded paths.

@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2023

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (15b7f66) 88.45% compared to head (3c28767) 88.45%.

Files Patch % Lines
lightning/src/routing/router.rs 91.56% 2 Missing and 5 partials ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2802      +/-   ##
==========================================
- Coverage   88.45%   88.45%   -0.01%     
==========================================
  Files         114      114              
  Lines       91814    91912      +98     
  Branches    91814    91912      +98     
==========================================
+ Hits        81218    81304      +86     
- Misses       8103     8107       +4     
- Partials     2493     2501       +8     

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

Copy link
Contributor

@shaavan shaavan left a comment

Choose a reason for hiding this comment

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

The code changes look great, and as far as the code changes go, the PR looks good to me.

But I am super curious about the issue this PR is solving.

The bindings generator struggles a bit with the references in enum variant fields in CandidateRouteHop.

Would love to know more about how you found this issue and pinpointed its source.

Thanks a lot!

The bindings generator struggles a bit with the references in enum
variant fields in `CandidateRouteHop`. While we could probably fix
this, its much eaiser (and less risky) to inline the enum variant
fields from `CandidateRouteHop` into structs. This also lets us
make some of the fields non-public, which seems better at least for
the opaque `hint_idx` in the blinded paths.
@TheBlueMatt
Copy link
Collaborator Author

Gonna go ahead and land this cause its just pretty straightforward code motion and we'll want it for bindings either now or later.

@TheBlueMatt TheBlueMatt merged commit 78ac48c into lightningdevkit:main Jan 8, 2024
14 of 15 checks passed
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.

None yet

4 participants