Skip to content
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

Prevent pending payments on same payment hash #652

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dpad85
Copy link
Member

@dpad85 dpad85 commented Nov 15, 2024

This PR adds an additional control when paying a bolt11 invoice. We now not only check that the payment has not already been paid, but also that it's not pending either. Trying to pay the same payment hash in parallel can cause issues and channels being force-closed.

A new BadRequestReason.PaymentPending error type has been added.

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