Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show total channels and peers #1078

Merged
merged 1 commit into from
Feb 12, 2025
Merged

fix: show total channels and peers #1078

merged 1 commit into from
Feb 12, 2025

Conversation

im-adithya
Copy link
Member

Fixes #1070

In LND, ListPeers only returns the list of connected peers so this fix will not make a difference there, not sure about LDK.
Channels should be fixed though.

Screenshots

Screenshot 2025-02-10 at 7 57 52 PM

On switching off a node in Polar: (Notice Peers)

Screenshot 2025-02-10 at 7 57 16 PM

@im-adithya im-adithya requested a review from rolznz February 10, 2025 14:28
Copy link
Contributor

@rolznz rolznz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@rolznz
Copy link
Contributor

rolznz commented Feb 12, 2025

@im-adithya in the second screenshot, why is the peers not 1 / 2?

@im-adithya
Copy link
Member Author

Mentioned in the PR comment, ListPeers in LND only returns list of active connected peers

@rolznz
Copy link
Contributor

rolznz commented Feb 12, 2025

@im-adithya sorry, I read your comment. That's weird in LND. Is there a way to get offline peers? it would be good to show those. LDK shows offline peers.

@rolznz rolznz merged commit 3173b14 into master Feb 12, 2025
10 checks passed
@rolznz rolznz deleted the fix/stats-for-nerds branch February 12, 2025 14:38
@im-adithya
Copy link
Member Author

I checked the LND codebase as well, sadly we can't fetch the offline peers. But one thing we can do is to calculate those from the offline channels if any and add them up, but I feel it might be unnecessary work

@rolznz
Copy link
Contributor

rolznz commented Feb 12, 2025

@im-adithya that won't be perfect either since you can have peers with no channels. I guess it's ok for now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: channel count & peers in stats for nerds show only online, not total
2 participants