[NUT-15] LND Support for MPP Payments #536

Merged
a1denvalu3 merged 25 commits from lnd-partial-payments into main 2025-02-06 09:30:48 +00:00
a1denvalu3 commented 2025-01-14 16:17:16 +00:00 (Migrated from github.com)

Description

Query the high probability routes for the public key in the invoice. Attempt the first route: if the failure code is 15 (TEMPORARY_CHANNEL_FAILURE), attempt the next route.


CHANGED

  • pay_invoice: forks execution based on the presence of a partial_amount.

Checklist

### Description Query the high probability routes for the public key in the invoice. Attempt the first route: if the failure code is 15 (TEMPORARY_CHANNEL_FAILURE), attempt the next route. ---- #### CHANGED * `pay_invoice`: forks execution based on the presence of a partial_amount. ---- ### Checklist * [x] I followed the [code style guidelines](https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md) * [] I ran `just final-check` before committing
thesimplekid (Migrated from github.com) reviewed 2025-01-15 23:54:47 +00:00
@ -202,3 +203,3 @@
melt_quote: mint::MeltQuote,
_partial_amount: Option<Amount>,
partial_amount: Option<Amount>,
max_fee: Option<Amount>,
thesimplekid (Migrated from github.com) commented 2025-01-15 23:49:39 +00:00

Wont this return here due to the use of ? so if the payment fails the next route cannot be tried?

Wont this return here due to the use of `?` so if the payment fails the next route cannot be tried?
thesimplekid (Migrated from github.com) commented 2025-01-15 23:50:12 +00:00

Do we want to return the function here or continue to next route?

Do we want to return the function here or continue to next route?
thesimplekid (Migrated from github.com) commented 2025-01-15 23:52:28 +00:00

NIT: Since we care about both paths the Some and None we should use a match and not if let to be consistent with code style https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md#if-let

NIT: Since we care about both paths the `Some` and `None` we should use a `match` and not `if let` to be consistent with code style https://github.com/cashubtc/cdk/blob/main/CODE_STYLE.md#if-let
a1denvalu3 (Migrated from github.com) reviewed 2025-01-16 10:02:10 +00:00
@ -202,3 +203,3 @@
melt_quote: mint::MeltQuote,
_partial_amount: Option<Amount>,
partial_amount: Option<Amount>,
max_fee: Option<Amount>,
a1denvalu3 (Migrated from github.com) commented 2025-01-16 10:02:10 +00:00

I think we want to return in this case. Clearly something is wrong with the response.

I think we want to return in this case. Clearly something is wrong with the response.
a1denvalu3 (Migrated from github.com) reviewed 2025-01-16 10:03:49 +00:00
@ -202,3 +203,3 @@
melt_quote: mint::MeltQuote,
_partial_amount: Option<Amount>,
partial_amount: Option<Amount>,
max_fee: Option<Amount>,
a1denvalu3 (Migrated from github.com) commented 2025-01-16 10:03:43 +00:00

I think we only want to try more routes if we get a specific error 15 (TEMPORARY_CHANNEL_FAILURE). If we get any other kind of error then something else is up.

I think we only want to try more routes if we get a specific error 15 (TEMPORARY_CHANNEL_FAILURE). If we get any other kind of error then something else is up.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!536
No description provided.