-
Notifications
You must be signed in to change notification settings - Fork 23
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
Explicit pattern match on all ledger certificates constructors. Remove redundant module #277
Explicit pattern match on all ledger certificates constructors. Remove redundant module #277
Conversation
…e redundant module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't get the details but it does look really equivalent to the state before this PR
case shelleyCert of | ||
Ledger.RegTxCert _ -> Nothing | ||
Ledger.UnRegTxCert cred -> Just cred | ||
Ledger.DelegStakeTxCert _ _ -> Nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DelegStakeTxCert
has a stake credential. We should put TODOs
by certificates that contain stake pool credentials while we think about what to do with the StakeCredential
type.
|
||
ConwayCertificate cEra conwayCert -> conwayEraOnwardsConstraints cEra $ | ||
case conwayCert of | ||
Ledger.RegTxCert _ -> Nothing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RegTxCert
, RegDepositTxCert
, UnRegDepositTxCert
have stake credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function is used here to retrieve all deregistration certificates (this could be one function instead of two though). I specifically didn't want to change the behaviour.
The question is, is the current behaviour correct, or should we fetch all certificates instead?
@smelc yes, that is the point of this PR. I was addressing a remark from a different PR. |
…ndling Simplify era handling
Changelog
Context
https://github.com/input-output-hk/cardano-api/pull/268/files#r1337354463
Checklist
See Running tests for more details
.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7