Open
Description
Currently we don't enforce any ordering and just return whatever the LSP provides. The spec says these need to be ordered by fee rates. Perhaps this means implementing Ord/PartialOrd and then using some built-in sorting alg?
From the spec:
The LSP, when ordering the opening_fee_params_menu array, MUST order by the following rules:
The 0th item MAY have any parameters.
Each succeeding item MUST, compared to the previous item, obey any one of the following:
- Have a larger min_fee_msat, and equal proportional.
- Have a larger proportional, and equal min_fee_msat.
- Have a larger min_fee_msat, AND larger proportional.
Rationale This simplifies how the client expresses the expected opening fee to the user, as it assures the client that the order of the fee rates is strictly increasing.