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

tx-generator: Core.hs: simplifications + better non-Byron support #6085

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Jan 23, 2025

Description

As part of my work on adapting tx-generator to upcoming changes to API (this is https://github.com/IntersectMBO/cardano-node/commits/smelc/adapt-to-api-removal-of-protocol-parameters-use-ledger-type-instead/), I:

  1. found a place where the code could be simplified (this is the first commit)
  2. found that Byron was not being supported in this place, and so removed the corresponding error case, by pushing the non-Byron constraints to callers.

Point 1. is good on its own while point 2. will make my life easier for the branch mentioned above, but it is optional (I can live with it).

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • 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

@smelc smelc changed the title tx-generator: Core.hs: simplify queryRemoteProtocolParameters tx-generator: Core.hs: simplifications + better non-Byron support Jan 23, 2025
@smelc smelc marked this pull request as ready for review January 23, 2025 14:47
@smelc smelc requested a review from a team as a code owner January 23, 2025 14:47
Copy link
Contributor

Choose a reason for hiding this comment

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

This new helper function caseByronOrShelleyBasedEra is wonderful, thanks for propagating its use onward!

Copy link
Contributor

@NadiaYvette NadiaYvette left a comment

Choose a reason for hiding this comment

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

Propagating the new helper function out to us is great & lifting the remote handling for Byron up a layer of calls is a good refactor too.

@smelc smelc added this pull request to the merge queue Jan 24, 2025
Merged via the queue into master with commit e3e74b0 Jan 24, 2025
23 of 25 checks passed
@smelc smelc deleted the smelc/tx-generator-simplifications branch January 24, 2025 17:49
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