Skip to content

Remove unnecessary PaymentStatus::SendingFailed #125

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

Merged

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Jun 15, 2023

Previously, I had a misunderstood in what event retrying payments is safe and erred on the conservative side. It turns out that it's indeed safe to retry a payment as soon as we receive LdkEvent::PaymentFailed and the misleading docs have since been removed (lightningdevkit/rust-lightning#2340).

Therefore, we can here now only refuse to send duplicate payments if our previous status is Succeeded or Pending, which renders the additional distinction between Failed and SendingFailed superfluous. Accordingly, we remove this PaymentStatus variant.

Previously, I had a misunderstood in what event retrying payments is
safe. It turns out that it's indeed safe to retry a payment as soon as
we receive `LdkEvent::PaymentFailed`.

Therefore, we can here now only refuse to send duplicate payments if our previous status is
`Succeeded` or `Pending`, which renders the additional distinction
between `Failed` and `SendingFailed` superfluous. Accordingly, we remove
this `PaymentStatus` variant.
@tnull tnull added this to the 0.1 milestone Jun 15, 2023
@tnull tnull mentioned this pull request Jun 15, 2023
47 tasks
@tnull tnull merged commit cf0094b into lightningdevkit:main Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants