Skip to content

test(uniqueness): assert pool_stat is unique per (pool_hash_id, epoch_no)#2142

Merged
ArturWieczorek merged 1 commit into
masterfrom
artur/add-pool-stat-uniqueness-check
Jun 22, 2026
Merged

test(uniqueness): assert pool_stat is unique per (pool_hash_id, epoch_no)#2142
ArturWieczorek merged 1 commit into
masterfrom
artur/add-pool-stat-uniqueness-check

Conversation

@ArturWieczorek

Copy link
Copy Markdown
Contributor

Description

Add your description here, if it fixes a particular issue please provide a link to the issue.

Checklist

  • Commit sequence broadly makes sense
  • Commits have useful messages
  • New tests are added if needed and existing tests are updated
  • Any changes are noted in the changelog
  • Code is formatted with fourmolu on version 0.17.0.0 (which can be run with scripts/fourmolize.sh)
  • Self-reviewed the diff

Migrations

  • The pr causes a breaking change of type a,b or c
  • If there is a breaking change, the pr includes a database migration and/or a fix process for old values, so that upgrade is possible
  • Resyncing and running the migrations provided will result in the same database semantically

If there is a breaking change, especially a big one, please add a justification here. Please elaborate
more what the migration achieves, what it cannot achieve or why a migration is not possible.

@ArturWieczorek ArturWieczorek requested a review from a team as a code owner June 22, 2026 09:10
…_no)

pool_stat should hold at most one row per pool per epoch. Add a
check_unique assertion in the POOLS section of test-uniqueness.sql
so duplicate (pool_hash_id, epoch_no) rows are caught.

Covers #1986, #1901, #1987.
@ArturWieczorek ArturWieczorek force-pushed the artur/add-pool-stat-uniqueness-check branch from 0276caa to bfe866f Compare June 22, 2026 09:15
@ArturWieczorek ArturWieczorek changed the title test(test-uniqueness): add uniqueness check for pool_stat test(uniqueness): assert pool_stat is unique per (pool_hash_id, epoch_no) Jun 22, 2026
@ArturWieczorek ArturWieczorek merged commit 2e75e5f into master Jun 22, 2026
21 checks passed
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.

2 participants