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

Fix off-by-one for unfunded channel peers

Public commit record

What the developer wrote

Authored by elnosh

68/100 · Adequate
Fix off-by-one for unfunded channel peers

When accepting channels manually, it would
fail if the # of peers without funded channels
was == `MAX_UNFUNDED_CHANNEL_PEERS`, however,
it should fail if the # of peers > `MAX_UNFUNDED_CHANNEL_PEERS`.
✓ 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 small boundary error in how Lightning Dev Kit counts peers that have unfunded channels. Previously, the software rejected new channel requests one peer too early, meaning legitimate users could be blocked from opening a channel when they were exactly at the configured limit. The fix changes the comparison from 'greater than or equal to' to 'greater than' the limit, restoring the intended behavior.

Recommended action

No immediate security response is required. Users running code with manual channel acceptance should update to include this fix to avoid unnecessary rejection of legitimate channel opens at the unfunded-peer limit. Review whether the stricter-than-intended behavior caused any operational issues.

Security signals we found

01

Logic boundary error in resource-limit enforcement

02

Denial-of-service-like effect: legitimate channel open requests rejected prematurely

03

Fix is minimal and targeted at a single comparison operator

Risk score

Why this scored 52/100

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