xpay: add sendamount#9100
Open
Lagrang3 wants to merge 7 commits intoElementsProject:masterfrom
Open
Conversation
Change the name of attempt->deliver to attempt->amount, do not assume that amount is the "desired delivery", since it might be the "desired send" depending on the payment context. Use helpers to get the fees and deliver amount from an attempt. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Change the name of payment->full_amount to payment->mpp_amount, to make clear that this refers to the value needed in the last hop payload for MPP payments to coordinate. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Don't assume that payment->amount means the desired delivery amount. Use a helper instead when we need that. Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Add an includefees flag to payment to indicate the desire for this payment to be a "send amount" kind instead of "receive amount". Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
for the final hop payload, which for normal xpay payments is known in advanced but not for sendamount payments (includefees flag on). Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
that only applies to sendamount payments (includefees flag on). Changelog-None Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
f036095 to
162bdbe
Compare
162bdbe to
8be1d8a
Compare
Member
|
Yay, native drain command in |
Collaborator
|
For
💀 😂 |
daywalker90
reviewed
Apr 30, 2026
| "resources": [ | ||
| "Main web site: [https://github.com/ElementsProject/lightning](https://github.com/ElementsProject/lightning)" | ||
| ], | ||
| "examples": [ |
Collaborator
There was a problem hiding this comment.
CI complains about formatting here. It wants the brackets in the same line, if the array is empty.
Changelog-Added: sendamount command, to make a payment specifying the desired amount to send instead of the amount to be received. Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
8be1d8a to
28f5083
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add sendamount command, to make a payment specifying the desired amount to send instead of the amount to be received.
This is a feature asked for in issue #8353.
Checklist
Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:
tools/lightning-downgrade