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

DRep deposits test #5748

Merged
merged 12 commits into from
Apr 11, 2024
Merged

DRep deposits test #5748

merged 12 commits into from
Apr 11, 2024

Conversation

palas
Copy link
Contributor

@palas palas commented Apr 4, 2024

Description

This PR addresses: #5601
For that it:

  • Adds two test scenarios where a DRep tries to register from scratch:
    • One where a deposit is enough
    • One where deposit is not enough
  • Then it tests whether the deposit that is enough got recorded in the ledger state by using foldEpochState
  • For reusing as much code as possible it also exposes and uses the internal function checkDRepsNumber' but renamed as something more meaningful and precise: getDRepInfo

Fixes #5742

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

@palas palas self-assigned this Apr 4, 2024
@palas palas requested a review from a team as a code owner April 4, 2024 17:26
@palas palas linked an issue Apr 4, 2024 that may be closed by this pull request
@palas palas changed the title Drep deposits test DRep deposits test Apr 4, 2024
@smelc
Copy link
Contributor

smelc commented Apr 5, 2024

Good stuff 👍

@palas palas requested a review from smelc April 5, 2024 23:22
@palas palas force-pushed the drep-deposits-test branch 3 times, most recently from d3ceb56 to 2972e82 Compare April 8, 2024 21:27
Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM! Some minor comments about where code should live but I wouldn't block the PR on this.

@palas palas enabled auto-merge April 10, 2024 21:24
@palas palas added this pull request to the merge queue Apr 10, 2024
Merged via the queue into master with commit f1f08f7 Apr 11, 2024
23 checks passed
@palas palas deleted the drep-deposits-test branch April 11, 2024 01:26
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.

Test DRep registration workflow DRep Deposits
4 participants