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

Set Tenscan listing totals to overall counts #1972

Merged
merged 7 commits into from
Jul 4, 2024
Merged

Conversation

badgersrus
Copy link
Contributor

@badgersrus badgersrus commented Jun 27, 2024

Why this change is needed

https://github.com/ten-protocol/ten-internal/issues/3539

What changes were made as part of this PR

  • /items/transactions/ now returns the result from the transaction_count table as the total
  • /items/batches/ now uses the latest sequence number as the total count
  • /items/rollups/ now returns the last index on the rollup_host table

Please provide a high level list of the changes made

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@badgersrus badgersrus changed the title Set tx listing total to actual tx count Set Tenscan listing totals to overall counts Jul 4, 2024
Copy link
Collaborator

@BedrockSquirrel BedrockSquirrel left a comment

Choose a reason for hiding this comment

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

LGTM, minor comment

err := db.QueryRow(selectLatestRollupCount).Scan(&total)
if err != nil {
if errors.Is(err, sql.ErrNoRows) {
return nil, errutil.ErrNotFound
Copy link
Collaborator

Choose a reason for hiding this comment

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

Return zero rather than error here imo

@badgersrus badgersrus merged commit e3fae8d into main Jul 4, 2024
2 checks passed
@badgersrus badgersrus deleted the will/tx-count-fix branch July 4, 2024 14:29
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.

None yet

2 participants