Merge pull request #10963 from elnosh/fix-networkinfo
Some checks are pending
Vulnerability scan / Scan release binaries (push) Waiting to run
CI / Static Checks (push) Waiting to run
CI / Check commits (push) Waiting to run
CI / Lint code (push) Waiting to run
CI / Cross compilation (push) Waiting to run
CI / Cross compilation-1 (push) Waiting to run
CI / Cross compilation-2 (push) Waiting to run
CI / Run unit tests (push) Waiting to run
CI / Run unit tests-1 (push) Waiting to run
CI / Run unit tests-2 (push) Waiting to run
CI / Run unit tests-3 (push) Waiting to run
CI / Run unit tests-4 (push) Waiting to run
CI / Run unit tests-5 (push) Waiting to run
CI / Run unit tests-6 (push) Waiting to run
CI / Run unit tests-7 (push) Waiting to run
CI / Run unit tests-8 (push) Waiting to run
CI / Run unit tests-9 (push) Waiting to run
CI / Run basic itests (push) Waiting to run
CI / Run basic itests-1 (push) Waiting to run
CI / Run basic itests-2 (push) Waiting to run
CI / Run basic itests-3 (push) Waiting to run
CI / Run basic itests-4 (push) Waiting to run
CI / Run itests (push) Waiting to run
CI / Run itests-1 (push) Waiting to run
CI / Run itests-2 (push) Waiting to run
CI / Run itests-3 (push) Waiting to run
CI / Run itests-4 (push) Waiting to run
CI / Run itests-5 (push) Waiting to run
CI / Run itests-6 (push) Waiting to run
CI / Run itests-7 (push) Waiting to run
CI / Run windows itest (push) Waiting to run
CI / Run macOS itest (push) Waiting to run
CI / Check pinned dependencies (push) Waiting to run
CI / Check pinned dependencies-1 (push) Waiting to run
CI / Check release notes updated (push) Waiting to run
CI / Backwards compatibility test (push) Waiting to run
CI / Cache Cleanup (push) Waiting to run
CI / Send coverage report (push) Blocked by required conditions

rpcserver: fix stats undercount in GetNetworkInfo
This commit is contained in:
ziggieXXX 2026-07-13 11:31:07 -03:00 committed by GitHub
commit 02f4116926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View file

@ -49,6 +49,12 @@
exclude such inputs from sweeping even though their input set could
comfortably pay its fees.
* [Fixed a bug](https://github.com/lightningnetwork/lnd/pull/10963) in
`GetNetworkInfo` where encountering an already-seen channel skipped the
rest of that node's channels instead of just that channel, undercounting
the reported network statistics such as total network capacity, channel
count and max out degree.
# New Features
## Functional Enhancements

View file

@ -6681,11 +6681,10 @@ func (r *rpcServer) GetNetworkInfo(ctx context.Context,
// channel encountered.
outDegree++
// If we've already seen this channel, then we'll
// return early to ensure that we don't double-count
// stats.
// If we've already seen this channel, skip it to
// ensure that we don't double-count stats.
if _, ok := seenChans[edge.ChannelID]; ok {
return nil
continue
}
// Compare the capacity of this channel against the