-
Notifications
You must be signed in to change notification settings - Fork 427
Change Bolt11Invoice payment_hash function return type #4293
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
base: main
Are you sure you want to change the base?
Change Bolt11Invoice payment_hash function return type #4293
Conversation
|
I've assigned @TheBlueMatt as a reviewer! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4293 +/- ##
==========================================
- Coverage 89.36% 86.55% -2.82%
==========================================
Files 180 158 -22
Lines 139847 101821 -38026
Branches 139847 101821 -38026
==========================================
- Hits 124975 88128 -36847
+ Misses 12278 11273 -1005
+ Partials 2594 2420 -174
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:
|
vincenzopalazzo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a pass of this PR, and the git history can be squashed into a single message that includes also a small line for the potential breaking change that this PR is introducing.
In addition, if changing to by-value return is what we want, do you think that we should consider updating payment_secret() as well for consistency (perhaps in a follow-up PR, or expand this one's scope).
|
@vincenzopalazzo updating |
|
🔔 1st Reminder Hey @TheBlueMatt! This PR has been waiting for your review. |
Probably better wait the input from @TheBlueMatt before considering the |
alright. that tracks. i'll make the necessary changes you pointed out |
|
🔔 2nd Reminder Hey @TheBlueMatt! This PR has been waiting for your review. |
|
🔔 3rd Reminder Hey @TheBlueMatt! This PR has been waiting for your review. |
51fc781 to
f3c4954
Compare
This commit fixes the payment_hash function of Bolt11Invoice to return a PaymentHash type instead of a sha256 byte stream. Code and test files dependent on this function have also been modified to adhere to the updated changes.
f3c4954 to
9c802c2
Compare
|
🔔 4th Reminder Hey @TheBlueMatt! This PR has been waiting for your review. |
This change updates
Bolt11Invoice'spayment_hashfunction's return type from a stream of bytes (sha256 digest) toPaymentHash, which is now a valid type inlightning_types. Also, tests and other functions that called the function were refactored to reflect that modification.Closes #4292