-
Notifications
You must be signed in to change notification settings - Fork 3
Investigate LNbits leaving failed CLN outgoing payments stuck as pending #250
Copy link
Copy link
Open
Description
Summary
LNbits can leave outgoing payments in pending state even after Core Lightning has already marked them failed.
What we observed
- CLN
listpaysandpaystatusshow multiple outgoing payments togondorasfailed. - LNbits still shows those same outgoing payments as
pending. - LNbits logs show this sequence right after payment creation:
POST /api/v1/paymentsreturns201- then
GET /api/v1/payments/<payment_hash>logsNo payments found for payment hash ...
- LNbits SQLite rows in
apipaymentsremainstatus = 'pending'for those hashes.
Example affected payment hashes
4076f2301b5ebed0479e1a131b60a7ae286e9ba4265ea49b18b965838b187908(avast)bfdefdde10f0ad0e79a8a813d4c9e619921e23ace8c4d973da34c30b89841975(test 3)33f5a21d791357c064eb0c57e0e86c6136f90d6a99aed6e29bf8bde2ee7e47dd(arrrr)
Likely direction
LNbits appears to query payment status before CLN has indexed the outgoing payment, gets a temporary "not found", and fails to reconcile that payment to failed later.
Investigation ideas
- Review LNbits
CLNRestWalletoutgoing payment status handling for theNo payments foundpath. - Check whether LNbits should retry or reconcile pending outgoing payments against CLN
listpaysandpaystatus. - Confirm whether failed outgoing payments are excluded from LNbits' periodic pending-payment reconciliation job.
- Consider marking backend "not found" as retryable instead of keeping the local row pending indefinitely.
Local evidence
From LNbits logs:
No payments found for payment hash 4076f2301b5ebed0479e1a131b60a7ae286e9ba4265ea49b18b965838b187908No payments found for payment hash bfdefdde10f0ad0e79a8a813d4c9e619921e23ace8c4d973da34c30b89841975No payments found for payment hash 33f5a21d791357c064eb0c57e0e86c6136f90d6a99aed6e29bf8bde2ee7e47dd
From LNbits SQLite apipayments:
- matching rows still have
status = pending
From CLN:
- corresponding outgoing pays are
failed, not pending
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels