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

[BUG REPORT] Current /v1/nodes route has incorrect result for total_pages on what is actually the last page of results. #1510

Open
blockjoe opened this issue Dec 2, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@blockjoe
Copy link
Contributor

blockjoe commented Dec 2, 2022

Via blocksandpixels#4229 on discord:

Hey all, there is a minor issue with the gateway API /v1/nodes endpoint. On the final page of results, the total_pages value is incorrect. If I curl with

"opts": {
    "page": 0,
    "per_page": 100,
    "staking_status": 1
  }

then total_pages is 20. However with

"opts": {
    "page": 20,
    "per_page": 100,
    "staking_status": 1
  },

… total_pages is 120 (varies depending on total number of results).

It looks as though total_pages is calculated as number of items / number of items on current page.

@blockjoe blockjoe added the bug Something isn't working label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant