-
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
Replace CertificatesSupportedInEra
with ShelleyBasedEra
#259
Replace CertificatesSupportedInEra
with ShelleyBasedEra
#259
Conversation
4369592
to
5f005f8
Compare
let certificates = body ^. L.certsTxBodyL in | ||
if null certificates | ||
then TxCertificatesNone | ||
else TxCertificates sbe (map (fromShelleyCertificate sbe) $ toList certificates) ViewTx |
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.
This function is simplified via the use of shelleyBasedEraConstraints
.
@@ -1687,13 +1656,14 @@ deriving instance Show (TxWithdrawals build era) | |||
|
|||
data TxCertificates build era where |
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.
Can we replace this with
data TxCertificates build era where | |
type TxCertificates build era | |
= Featured ShelleyBasedEra era | |
( [Certificate era] | |
, BuildTxWith build (Map StakeCredential (Witness WitCtxStake era)) | |
) |
?
Feels like it would simplify era-witness checking down the line.
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.
Yep. Can do that in a future commit.
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.
Please don't. Having this as a data definition makes it clearer what it is when using it.
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.
🚀
Changelog
Context
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