-
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
Clean up constraints on Proposal and Vote instances, add their generators for tests #118
Conversation
cardano-api/internal/Cardano/Api/Governance/Actions/VotingProcedure.hs
Outdated
Show resolved
Hide resolved
2e4cde3
to
4d23d54
Compare
4d23d54
to
be7baa3
Compare
) => FromCBOR (Vote era) where | ||
fromCBOR = Vote <$> Shelley.fromEraCBOR @Conway.Conway | ||
instance IsShelleyBasedEra era => ToCBOR (Vote era) where | ||
toCBOR (Vote vp) = obtainEraConstraints sbe $ Shelley.toEraCBOR @Conway.Conway vp |
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.
Ah so this is problematic because it assumes things won't change in future eras. We can update the Vote era
type with the ConwayEraOnwards era
GADT, See StakeDelegationRequirementsConwayOnwards
as an example.
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've changed type application to (ShelleyLedgerEra era)
- that should fix the CBOR en/decoding for eras != Conway. Do you also mean that we should add a constructor parameter with type ConwayEraOnwards era
?
639cad0
to
040b619
Compare
040b619
to
81e2f5b
Compare
…x-in-ci-for-mac Remove ghc-9.2.x in CI for Mac
Changelog
Context
n/a
Checklist
.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
Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.