rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

refactored `payment_parameters_from_zero_amount_invoice` to `amount-less`

Open srikanth-iyengar opened this issue 1 year ago • 6 comments

Fix #2879 Refactored payment_parameters_from_zero_amount_invoice to amount-less as per the discussion in the issue

srikanth-iyengar avatar Apr 01 '24 17:04 srikanth-iyengar

The changes look good. Just one small nit.

I think it will be a good idea to amend the payment_parameters_from_amount_less_invoice documentation so that readers can understand that zero-amount invoices are synonymous with amount-less invoices in this context.

Ohk will add the documentation

srikanth-iyengar avatar Apr 02 '24 16:04 srikanth-iyengar

@shaavan should I add the doc just below this ? https://github.com/lightningdevkit/rust-lightning/blob/9325070a7e5e48c10b53a77e0ccc6f9c6073e555/lightning-invoice/src/payment.rs#L19-L28

srikanth-iyengar avatar Apr 02 '24 16:04 srikanth-iyengar

I was thinking maybe something simple like this may also work

 /// Builds the necessary parameters to pay or pre-flight probe the given zero-amount
-/// [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
+/// (amount-less) [`Bolt11Invoice`] using [`ChannelManager::send_payment`] or
 /// [`ChannelManager::send_preflight_probes`].

But feel free to handle it in whichever way you prefer!

shaavan avatar Apr 03 '24 05:04 shaavan

Got it :+1:

srikanth-iyengar avatar Apr 03 '24 05:04 srikanth-iyengar

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.08%. Comparing base (51926f1) to head (e9d9a81). Report is 105 commits behind head on main.

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2979      +/-   ##
==========================================
- Coverage   89.38%   89.08%   -0.30%     
==========================================
  Files         117      118       +1     
  Lines       95513    97492    +1979     
  Branches    95513    97492    +1979     
==========================================
+ Hits        85376    86854    +1478     
- Misses       7913     8387     +474     
- Partials     2224     2251      +27     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 05 '24 12:04 codecov-commenter

Please make your commit message more descriptive, see https://cbea.ms/git-commit/ for some guidelines.

TheBlueMatt avatar Apr 11 '24 13:04 TheBlueMatt

Closing as abandoned

TheBlueMatt avatar Jun 13 '24 15:06 TheBlueMatt