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

feat(gRPC): add only_connected parameter to getNetworkInfo API #1264

Merged
merged 6 commits into from
May 8, 2024

Conversation

kehiy
Copy link
Contributor

@kehiy kehiy commented May 6, 2024

Description

This PR updates the Network API in gRPC to display only connected peers. Connected peers are those with a status of "Connected" or "Known".

@kehiy kehiy requested a review from b00f May 6, 2024 10:03
www/grpc/network.go Outdated Show resolved Hide resolved
www/grpc/network.go Outdated Show resolved Hide resolved
@b00f
Copy link
Collaborator

b00f commented May 6, 2024

@kehiy
Please test it.
Can you add HTTP page for only connected peers: like "/network/connected"

www/grpc/proto/network.proto Outdated Show resolved Hide resolved
@b00f b00f changed the title feat: adding onlyOnline falg to getNetworkInfo API feat(gRPC): add only_connected parameter to getNetworkInfo API May 6, 2024
@kehiy kehiy requested a review from b00f May 6, 2024 12:58
@kehiy
Copy link
Contributor Author

kehiy commented May 6, 2024

@b00f HTTP is supported for this flag too. we can use it like:

http://localhost:8081/network?onlyConnected=true

Copy link

codecov bot commented May 6, 2024

Codecov Report

Attention: Patch coverage is 55.55556% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 75.93%. Comparing base (20e991a) to head (6a6ca1d).

❗ Current head 6a6ca1d differs from pull request most recent head e78101b. Consider uploading reports for the commit e78101b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1264      +/-   ##
==========================================
- Coverage   76.05%   75.93%   -0.13%     
==========================================
  Files         206      206              
  Lines       10672    10680       +8     
==========================================
- Hits         8117     8110       -7     
- Misses       2169     2179      +10     
- Partials      386      391       +5     

@kehiy
Copy link
Contributor Author

kehiy commented May 7, 2024

@b00f can you have a review?

@b00f b00f merged commit a8aaccc into pactus-project:main May 8, 2024
10 checks passed
@kehiy kehiy deleted the feature/only-online branch June 9, 2024 09:17
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.

2 participants