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

Don't auto-fail offers payments pre-HTLC lock in

Public commit record

What the developer wrote

Authored by Valentine Wallace

68/100 · Adequate
Don't auto-fail offers payments pre-HTLC lock in

Previously, we had a bug that particularly affected async payments where if an
outbound payment was in the state {Static}InvoiceReceived and there was a call
to process_pending_htlc_forwards, the payment would be automatically abandoned.
We would behave correctly and avoid abandoning if the payment was awaiting an
invoice, but not if the payment had an invoice but the HTLCs weren't yet locked
in.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in the Lightning Dev Kit where certain asynchronous payments could be wrongly marked as failed before the actual payment HTLCs were locked in. The fix expands the definition of 'not yet ready to fail' to include payments that have received an invoice but have not yet locked in HTLCs, preventing premature abandonment.

Recommended action

Review and merge the patch; ensure downstream users relying on async/BOLT 12 payments update to include this fix, as premature abandonment could cause incorrect payment failure reporting and user confusion.

Security signals we found

01

Logic bug causing premature payment failure/abandonment

02

State-machine check too narrow for async payment lifecycle

03

Regression test added for the fixed behavior

04

No explicit security framing by vendor in commit message

Risk score

Why this scored 57/100

Our methodology →
Potential impact 18/30
Exploitability 10/25
Stealth signal 8/15
Affected reach 9/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.