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

LedgerState.hs improvements #503

Merged
merged 10 commits into from
Apr 3, 2024
Merged

LedgerState.hs improvements #503

merged 10 commits into from
Apr 3, 2024

Conversation

jasagredo
Copy link
Contributor

@jasagredo jasagredo commented Apr 1, 2024

Changelog

- description: |
    In `Cardano.API.LedgerState`:
    - Use type aliases and patterns from ouroboros-consensus instead of re-defining them. 
    - Import entities from the right modules.
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

How to trust this PR

These are just renamings for type aliases to reduce cognitive load. The exposed API remains the same.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@jasagredo jasagredo force-pushed the js/ledgerstate-improvements branch from 59fa43b to f719722 Compare April 1, 2024 13:14
pattern ConwayLedgerState x = S (S (S (S (S (S (Z x))))))

encodeLedgerState ::
Consensus.CardanoCodecConfig Consensus.StandardCrypto
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This type has in fact changed, but it was mostly confirmed by @carbolymer that these functions are probably dead/unused.

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!

@jasagredo jasagredo force-pushed the js/ledgerstate-improvements branch from d0e5be3 to 2e42f5b Compare April 3, 2024 13:53
@jasagredo
Copy link
Contributor Author

I just re-signed the commits. Please @carbolymer or @Jimbo4350 set this PR to merge when ready

@carbolymer carbolymer added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit aad54e8 Apr 3, 2024
23 checks passed
@carbolymer carbolymer deleted the js/ledgerstate-improvements branch April 3, 2024 15:01
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

3 participants