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

Simplify working with current epoch number #4767

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

lehins
Copy link
Collaborator

@lehins lehins commented Nov 21, 2024

Description

Placement of epochInfoEpoch, epochInfoFirst and epochInfoSize in a reader monad was superfluous.

Another improvement is making current epoch number lazy in the environment, because that information is not necessary for all types of transactions

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@lehins lehins requested a review from a team as a code owner November 21, 2024 04:51
@lehins lehins force-pushed the lehins/avoid-computing-current-epochNo branch from f3520aa to 5a45f60 Compare November 21, 2024 04:58
@lehins lehins force-pushed the lehins/avoid-computing-current-epochNo branch from 5a45f60 to eec0386 Compare November 21, 2024 05:03
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Looks good to me

@lehins lehins force-pushed the lehins/avoid-computing-current-epochNo branch from eec0386 to 75c789f Compare November 21, 2024 20:08
Placement of `epochInfoEpoch`, `epochInfoFirst` and `epochInfoSize` in a
reader monad was superfluous.

Another improvement is making current epoch number lazy in the
environment, because that information is not necessary for all types of
transactions
@lehins lehins force-pushed the lehins/avoid-computing-current-epochNo branch from 75c789f to e872b4b Compare November 21, 2024 21:03
@lehins lehins merged commit 397bf8f into master Nov 21, 2024
154 checks passed
@lehins lehins deleted the lehins/avoid-computing-current-epochNo branch November 21, 2024 23:33
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