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(core-api): return count of filtered peers #2814

Merged
merged 3 commits into from
Jul 17, 2019

Conversation

dated
Copy link
Contributor

@dated dated commented Jul 16, 2019

The peer api currently returns the total count of all peers, instead of the count of the filtered peers, thus messing with the pagination.

It's worth noting that the schema for index currently accepts ip, status, and port as query params, yet filtering based on those values is not implemented.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Refactor
  • Performance
  • Tests
  • Build
  • Documentation
  • Code style update
  • Continuous Integration
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes
  • No

Does this PR release a new version?

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • It's submitted to the develop branch, not the master branch
  • All tests are passing
  • New/updated tests are included

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@ghost
Copy link

ghost commented Jul 16, 2019

Thanks for submitting this pull request! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@ghost ghost added Complexity: Low labels Jul 16, 2019
@faustbrian
Copy link
Contributor

It's worth noting that the schema for index currently accepts ip, status, and port as query params, yet filtering based on those values is not implemented.

  1. ip filtering would have to be something like pattern matching but could be implemented.
  2. status can be removed from the schema as all peers that don't have a good status are disconnected.
  3. port can be removed from the schema as a fixed port is enforced so filtering it would do nothing.

dated and others added 2 commits July 16, 2019 15:53
Co-Authored-By: Brian Faust <faustbrian@users.noreply.github.com>
@dated
Copy link
Contributor Author

dated commented Jul 16, 2019

I've left ip in the schema to be implemented in a future PR, status and port have been removed.

@ghost
Copy link

ghost commented Jul 17, 2019

A collaborator has approved this PR. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait.

Thank you for your contribution!

@faustbrian faustbrian merged commit 3363fe7 into ArkEcosystem:develop Jul 17, 2019
@ghost
Copy link

ghost commented Jul 17, 2019

Your pull request has been merged and marked as tier 4. It will earn you $10 USD.

@dated dated deleted the fix/peers-total-count branch July 17, 2019 04:21
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