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

Fix: Payouts were incorrectly marked as canceled even after successful completion #6365

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

NicolasDorier
Copy link
Member

@NicolasDorier NicolasDorier commented Nov 8, 2024

Bug fix

Payouts were incorrectly marked as canceled even after successful completion on some Lightning implementations (NwC/Nostr and Blink).

Explanation

Following a refactoring of Payout in 2.0, the automated Lightning payout processor would pay the BOLT11 invoice and then request the payment data via the LightningClient.

However, retrieving payment data could fail in certain cases. For Nostr, this occurred when a timeout happened (for example, if the connection to relays is hanging).
For Blink, it failed if the recipient was also using a Blink wallet, as the pre-image wasn't accessible through the API.

This PR ensures that a failed call to GetPayment will no longer result in the payout being marked as canceled after a successful payment.

@NicolasDorier NicolasDorier force-pushed the payoutok branch 5 times, most recently from 87c894e to 9de209e Compare November 8, 2024 06:36
@NicolasDorier NicolasDorier changed the title Do not rely on GetPayment to assess the status of a payout Fix: Some payouts were marked as failed even after a payment success Nov 8, 2024
@NicolasDorier NicolasDorier changed the title Fix: Some payouts were marked as failed even after a payment success Fix: Some payouts were marked as cancelled even after a payment success Nov 8, 2024
@NicolasDorier NicolasDorier changed the title Fix: Some payouts were marked as cancelled even after a payment success Fix: Payouts were incorrectly marked as canceled even after successful completion Nov 8, 2024
@NicolasDorier NicolasDorier merged commit a05dbef into btcpayserver:master Nov 8, 2024
2 of 4 checks passed
@NicolasDorier NicolasDorier deleted the payoutok branch November 8, 2024 07:13
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.

1 participant