AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 50 Bitcoin

fix: self payment in lnd (#4241)

Public commit record

What the developer wrote

Authored by Vlad Stan

65/100 · Adequate
fix: self payment in lnd (#4241)
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This change fixes a bug where LNbits would leave a payment stuck in 'pending' status when the underlying LND lightning node rejected the payment because it was a self-payment (paying your own invoice). The fix tells LNbits to recognize LND's 'self-payments not allowed' error as a pre-dispatch failure, so it marks the payment as failed and refunds the user's balance instead of leaving it hanging.

Recommended action

Deploy the patch. Review other wallet backends for similar unhandled pre-dispatch error messages. Monitor for any stuck pending payments that may need manual reconciliation on affected nodes.

Security signals we found

01

State inconsistency bug: payment status not synchronized with backend failure

02

Self-payment rejection not handled as a terminal failure

03

Regression test added for security/state correctness

04

No input validation bypass or cryptographic weakness in diff

Risk score

Why this scored 50/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 10/15
Affected reach 8/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.