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(sequencer): query paginated #1305

Merged
merged 14 commits into from
Jan 8, 2025

Conversation

danwt
Copy link
Contributor

@danwt danwt commented Jan 6, 2025

PR Standards

Opening a pull request should be able to meet the following requirements

--

PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A


Close https://github.com/dymensionxyz/research/issues/447

<-- Briefly describe the content of this pull request -->

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@danwt danwt changed the title replaces proto dir with new one but it wont build feat(sequencer): query paginated Jan 6, 2025
@danwt danwt marked this pull request as ready for review January 6, 2025 18:43
@danwt danwt requested a review from a team as a code owner January 6, 2025 18:43
Comment on lines 415 to 429
err := c.RunWithRetry(func() error {
for {
qres, err := c.sequencerQueryClient.SequencersByRollapp(c.ctx, req)
if err != nil {
if status.Code(err) == codes.NotFound {
return retry.Unrecoverable(errors.Join(gerrc.ErrNotFound, err))
}
return err
}
res = append(res, qres.Sequencers...)
req.Pagination.Key = qres.GetPagination().NextKey
if req.Pagination.Key == nil {
return nil
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the change

@mtsitrin mtsitrin merged commit 3789c4a into main Jan 8, 2025
4 checks passed
@mtsitrin mtsitrin deleted the danwt/research-447-sequencer-pagination branch January 8, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants