-
Notifications
You must be signed in to change notification settings - Fork 411
Sort LSPS2 opening fee params menu according to spec requirements #3840
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?
Conversation
👋 Thanks for assigning @tnull as a reviewer! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3840 +/- ##
==========================================
- Coverage 89.88% 89.83% -0.05%
==========================================
Files 162 162
Lines 130415 130422 +7
Branches 130415 130422 +7
==========================================
- Hits 117217 117165 -52
- Misses 10509 10552 +43
- Partials 2689 2705 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
LGTM
4f1609c
to
16390e6
Compare
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.
LGTM
Minor nit: please avoid rebasing on main
if there are no conflicts, as it makes comparing the changes easier, especially if you force-push.
🔔 1st Reminder Hey @valentinewallace! This PR has been waiting for your review. |
Closes #3462
The LSPS2 specification requires that the
opening_fee_params_menu
array be sorted in a specific order to simplify fee display for clients, but the current implementation returns parameters in an arbitrary order.The LSPS2 spec:
This PR implements the sorting as described in the spec by sorting first by
min_fee_msat
, then byproportional
for equal values.The test creates an unsorted array of fee parameters and verifies that the returned menu follows all three ordering rules specified in the LSPS2 specification.