-
Notifications
You must be signed in to change notification settings - Fork 2.2k
ListPayments: filter out non-succeeded payments, include payment status #3190
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
ListPayments: filter out non-succeeded payments, include payment status #3190
Conversation
wpaulino
left a comment
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 💫
Note: the status will show in the lncli response as UNKNOWN, SUCCEEDED, IN_FLIGHT, and FAILED for those wondering.
|
Fails existing integration tests: |
Also make it optional to list non-succeeded payments.
Earlier versions of ListPayments only included completed payments. We return to this behavior by ignore all other payments if the nonSucceeded boolean is not set in the request.
608b18b to
0aec3fd
Compare
|
|
||
| message ListPaymentsRequest { | ||
| /// Set to also return payments that are not (yet) succeeded. | ||
| bool non_succeeded = 1; |
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.
naming suggestion: include_incomplete or include_unsuccessful?
|
|
||
| // convertPaymentStatus converts a channeldb.PaymentStatus to the type expected | ||
| // by the RPC. | ||
| func convertPaymentStatus(dbStatus channeldb.PaymentStatus) ( |
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.
is this something that could be defined in lnrpc?
Earlier versions of ListPayments only included completed payments. We
return to this behavior by ignore all other payments if the
nonSucceededboolean is not set in the request