[BUG REPORT] Current `/v1/nodes` route has incorrect result for `total_pages` on what is actually the last page of results.
blockjoe opened this issue · 0 comments
blockjoe commented
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.