Skip to content

invoice: swap RouteHop for RouteHint #887

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

Merged

Conversation

valentinewallace
Copy link
Contributor

To prevent naming conflicts in bindings

@valentinewallace valentinewallace force-pushed the invoice-use-RL-routehint branch 2 times, most recently from d7b18d0 to 1cde3ec Compare April 16, 2021 20:35
@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #887 (11641fe) into main (52f1d45) will increase coverage by 0.09%.
The diff coverage is 96.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #887      +/-   ##
==========================================
+ Coverage   90.21%   90.31%   +0.09%     
==========================================
  Files          55       57       +2     
  Lines       29091    29225     +134     
==========================================
+ Hits        26245    26394     +149     
+ Misses       2846     2831      -15     
Impacted Files Coverage Δ
lightning-invoice/src/lib.rs 84.35% <95.12%> (+0.16%) ⬆️
lightning-invoice/src/de.rs 81.35% <96.55%> (+0.35%) ⬆️
lightning-invoice/src/ser.rs 83.76% <100.00%> (+0.12%) ⬆️
lightning/src/routing/router.rs 96.21% <100.00%> (+0.42%) ⬆️
lightning/src/util/zbase32.rs 96.55% <0.00%> (ø)
lightning/src/util/message_signing.rs 93.10% <0.00%> (ø)
lightning/src/ln/functional_tests.rs 97.07% <0.00%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52f1d45...11641fe. Read the comment docs.

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Looks good at first glance.

@valentinewallace valentinewallace force-pushed the invoice-use-RL-routehint branch from 1cde3ec to 35ae764 Compare April 16, 2021 21:04
@TheBlueMatt
Copy link
Collaborator

Hmm, I wonder if it actually makes sense to further refactor a bit - a RouteHint isn't really itself a hint, but one hop in a potentially-but-rarely-larger RouteHint. The lightning_invoice::Route would then be a RouteHint making lightning::routing::router::RouteHint a RouteHintHop (though presumably we'd put both types in lightning::routing::router and use them consistently).

@valentinewallace
Copy link
Contributor Author

Hmm, I wonder if it actually makes sense to further refactor a bit - a RouteHint isn't really itself a hint, but one hop in a potentially-but-rarely-larger RouteHint. The lightning_invoice::Route would then be a RouteHint making lightning::routing::router::RouteHint a RouteHintHop (though presumably we'd put both types in lightning::routing::router and use them consistently).

Hum so moving the invoice crate's RouteHint (previously named Route) is a little involved. OK to put off?

@TheBlueMatt
Copy link
Collaborator

Hum so moving the invoice crate's RouteHint (previously named Route) is a little involved. OK to put off?

Hmm, up to you, is the issue the trait implementations? It should still be pretty practical, but its no huge rush.

Otherwise looks good.

@valentinewallace valentinewallace force-pushed the invoice-use-RL-routehint branch 2 times, most recently from 8b0bb0e to 75f5e4f Compare April 20, 2021 19:47
@valentinewallace valentinewallace force-pushed the invoice-use-RL-routehint branch from 75f5e4f to 11641fe Compare April 20, 2021 20:27
@TheBlueMatt TheBlueMatt merged commit f40e47c into lightningdevkit:main Apr 21, 2021
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