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]: pagination countTotal not working #21961

Closed
1 task done
JulianToledano opened this issue Sep 27, 2024 · 0 comments · Fixed by #22412
Closed
1 task done

[Bug]: pagination countTotal not working #21961

JulianToledano opened this issue Sep 27, 2024 · 0 comments · Fixed by #22412
Assignees
Labels

Comments

@JulianToledano
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

While working on client system tests, I found that querying Tendermint's validator set with a limit results in an empty key and incorrect total count.

For the following query:
/cosmos/base/tendermint/v1beta1/validatorsets/1?pagination.offset=0&pagination.limit=2

It returns:

{
  "block_height" : "1",
  "validators" : [ {
    "address" : "cosmosvalcons1pasvythqmpswzxu6rgp67fjd7hk6fp4hjrlk8m",
    "pub_key" : {
      "@type" : "/cosmos.crypto.ed25519.PubKey",
      "key" : "Zn/nOlbRzWy220yImisVzrCfLg1alXGrw/WMQC5yuAE="
    },
    "voting_power" : "100",
    "proposer_priority" : "-300"
  }, {
    "address" : "cosmosvalcons1j5kt90jhm42zr58vmpwtwummhqn5p6465udjgx",
    "pub_key" : {
      "@type" : "/cosmos.crypto.ed25519.PubKey",
      "key" : "hyknvANvB0JFSlabumkB+23Sux6hE8G6Ql7N5xxZ04E="
    },
    "voting_power" : "100",
    "proposer_priority" : "100"
  } ],
  "pagination" : {
    "next_key" : null,
    "total" : "4"
  }
}

Cosmos SDK Version

main

How to reproduce?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🥳 Done
Development

Successfully merging a pull request may close this issue.

2 participants