Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Add /peers/count endpoint #337

Closed
ghost opened this issue Dec 5, 2016 · 5 comments
Closed

Add /peers/count endpoint #337

ghost opened this issue Dec 5, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Dec 5, 2016

It would be useful to get real count of all currently connected peers
/api/peers/count

@dakk
Copy link
Contributor

dakk commented Dec 21, 2016

I could implement it if main-dev tells that this call is really needed.

Propesed response format (same format as https://lisk.io/documentation?i=lisk-docs/APIReference#get-total-count-of-delegates):

{
  "success": true,
  "count": 26
}

@karmacoma
Copy link
Contributor

@dakk Sure go ahead, I think would be useful 👍

@dakk
Copy link
Contributor

dakk commented Dec 21, 2016

I'm on it

@dakk
Copy link
Contributor

dakk commented Dec 21, 2016

@karmacoma in your opinion, is it necessary to count peers in db with connected=2 or I need to ask to express how many connections are active in the last period?
In a REST environment "connected peers" could mean everything

@karmacoma
Copy link
Contributor

@dakk For now I think it would good enough to simply count by status i.e. 0,1,2.

Returning a result such as:

{banned: 1, disconnected: 0, connected: 100}

This was referenced Dec 21, 2016
@karmacoma karmacoma added this to the Core Sprint 01 milestone Jan 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants