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

Include HTLCs unknown by remote in `can_accept_incoming_htlc` stats

Public commit record

What the developer wrote

Authored by Leo Nash

73/100 · Adequate
Include HTLCs unknown by remote in `can_accept_incoming_htlc` stats

While these HTLCs may currently be unknown to our counterparty, they can
end up in commitments soon. Moreover, we are considering failing a
single HTLC here, not the entire channel, so we opt to be conservative
in what we accept to forward.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change makes the Lightning node more cautious when deciding whether to accept a forwarded payment (HTLC). Previously, the node only counted HTLCs that the counterparty already knew about when checking channel capacity limits. Now it also counts HTLCs that have been announced locally but not yet acknowledged by the remote side. This prevents the node from accepting a new forward that could push the channel over its limits once those in-flight HTLCs are committed, reducing the risk of being unable to fulfill obligations or being forced into an unfavorable state.

Recommended action

Review related test coverage for `can_accept_incoming_htlc` with pending un-ACKed outbound HTLCs and anchor/zero-fee channels. Consider whether the same conservative treatment is needed in other commitment-stat calculations (e.g., counterparty-side stats) and monitor for any regressions in forwarding throughput.

Security signals we found

01

Change in HTLC acceptance policy affecting channel balance/fee calculations

02

Explicit commit-message rationale about conservative forwarding to avoid future commitment issues

03

Modification of anchor/non-anchor commitment fee-spike buffer logic context

04

Potential prevention of local commitment over-allocation / insufficient reserve scenarios

Risk score

Why this scored 61/100

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