Skip to content

rpcserver: fix stats undercount in GetNetworkInfo#10963

Open
elnosh wants to merge 1 commit into
lightningnetwork:masterfrom
elnosh:fix-networkinfo
Open

rpcserver: fix stats undercount in GetNetworkInfo#10963
elnosh wants to merge 1 commit into
lightningnetwork:masterfrom
elnosh:fix-networkinfo

Conversation

@elnosh

@elnosh elnosh commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

I was seeing dubious numbers from getnetworkinfo command which did not match at all to the graph from describegraph.

Seems the issue is that it is returning early instead of continuing in the loop in GetNetworkInfo so it ended up under counting the stats.

Finding the issue in the code was LLM-assisted

On an already-seen channel, the loop returned from the whole node
callback instead of continuing, skipping the node's remaining
channels, this undercounted the stats.
@github-actions github-actions Bot added the severity-critical Requires expert review - security/consensus critical label Jul 11, 2026
@github-actions

Copy link
Copy Markdown

🔴 PR Severity: CRITICAL

Explicit rule match | 1 file | 7 lines changed

🔴 Critical (1 file)
  • rpcserver.go - Core server coordination file, explicitly listed as a CRITICAL path (RPC entry point / core server logic)

Analysis

The only file changed is rpcserver.go, which is explicitly named in the CRITICAL tier as a core server coordination file. The change itself is small (3 additions, 4 deletions) and fixes a control-flow bug in GetNetworkInfo where the loop was returning early instead of continuing, causing undercounted network stats. While the fix is narrowly scoped and low-risk in nature, the file itself warrants expert review per the classification rules, and the size of the diff does not qualify for a severity bump (only 7 lines changed, well under the 500-line/20-file thresholds) nor does it warrant a downgrade — file-based classification takes precedence.


To override, add a severity-override-{critical,high,medium,low} label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

severity-critical Requires expert review - security/consensus critical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant