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

lightningd: record why a local forward failed in listforwards

Public commit record

What the developer wrote

Authored by Andezion

85/100 · Strong
lightningd: record why a local forward failed in listforwards

Changelog-Added: JSON-RPC: 'listforwards' and the 'forward_event' notification have a new 'failure_reason' field with the root cause of a local forward failure ('insufficient_outgoing_liquidity', 'too_many_htlcs', 'max_htlc_value_in_flight')
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit adds a new 'failure_reason' field to the listforwards RPC output and forward_event notification. It records why a local HTLC forward failed (for example, not enough outgoing liquidity, too many HTLCs, or the peer cannot afford the commitment fee). It is primarily an observability and diagnostics improvement, not a security fix or vulnerability.

Recommended action

No security action required. Treat as a normal feature/observability improvement. Reviewers may want to confirm that the new database column and wire field are handled correctly during downgrade scenarios, as the code already includes a fallback for unknown enum values.

Security signals we found

01

New enum classifies local forward failures for diagnostics

02

Database migration adds nullable 'reason' column to forwards table

03

Wire message channeld_offer_htlc_reply extended with reason field

04

No change to HTLC acceptance logic, only to failure metadata

05

New test cases verify failure_reason values for various local failure scenarios

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 1/15
Affected reach 2/15
Confidence 9/10
Evidence quality 5/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.