-
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
Fix exception when executing drep queries #221
Conversation
@@ -675,17 +675,16 @@ toConsensusQueryShelleyBased erainmode (QueryStakeDelegDeposits creds) = | |||
creds' = Set.map toShelleyStakeCredential creds | |||
|
|||
toConsensusQueryShelleyBased erainmode QueryGovState = | |||
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR Consensus.GetGovState)) | |||
Some (consensusQueryInEraInMode erainmode Consensus.GetGovState) |
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.
Why sometimes do we need GetCBOR
?
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 don't know the answer to this unfortunately.
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 issue (for example) is here:
...
fromConsensusQueryResultShelleyBased _ QueryStakeSnapshot{} q' r' =
case q' of
Consensus.GetCBOR Consensus.GetStakeSnapshots {} -> SerialisedStakeSnapshots r'
_ -> fromConsensusQueryResultMismatch
fromConsensusQueryResultShelleyBased _ QueryStakeDelegDeposits{} q' stakeCreds' =
case q' of
Consensus.GetStakeDelegDeposits{} -> Map.map fromShelleyLovelace
. Map.mapKeysMonotonic fromShelleyStakeCredential
$ stakeCreds'
_ -> fromConsensusQueryResultMismatch
fromConsensusQueryResultShelleyBased _ QueryGovState{} q' govState' =
case q' of
Consensus.GetGovState{} -> govState'
_ -> fromConsensusQueryResultMismatch
...
You need to pattern match on Consensus.GetCBOR Consensus.GetGovState{}
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.
#221 (comment): Ignore this as Sam says its not useful. Make sure the queries work in the cli however before merging this.
@@ -675,17 +675,16 @@ toConsensusQueryShelleyBased erainmode (QueryStakeDelegDeposits creds) = | |||
creds' = Set.map toShelleyStakeCredential creds | |||
|
|||
toConsensusQueryShelleyBased erainmode QueryGovState = | |||
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR Consensus.GetGovState)) | |||
Some (consensusQueryInEraInMode erainmode Consensus.GetGovState) |
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 issue (for example) is here:
...
fromConsensusQueryResultShelleyBased _ QueryStakeSnapshot{} q' r' =
case q' of
Consensus.GetCBOR Consensus.GetStakeSnapshots {} -> SerialisedStakeSnapshots r'
_ -> fromConsensusQueryResultMismatch
fromConsensusQueryResultShelleyBased _ QueryStakeDelegDeposits{} q' stakeCreds' =
case q' of
Consensus.GetStakeDelegDeposits{} -> Map.map fromShelleyLovelace
. Map.mapKeysMonotonic fromShelleyStakeCredential
$ stakeCreds'
_ -> fromConsensusQueryResultMismatch
fromConsensusQueryResultShelleyBased _ QueryGovState{} q' govState' =
case q' of
Consensus.GetGovState{} -> govState'
_ -> fromConsensusQueryResultMismatch
...
You need to pattern match on Consensus.GetCBOR Consensus.GetGovState{}
@@ -675,17 +675,16 @@ toConsensusQueryShelleyBased erainmode (QueryStakeDelegDeposits creds) = | |||
creds' = Set.map toShelleyStakeCredential creds | |||
|
|||
toConsensusQueryShelleyBased erainmode QueryGovState = | |||
Some (consensusQueryInEraInMode erainmode (Consensus.GetCBOR Consensus.GetGovState)) | |||
Some (consensusQueryInEraInMode erainmode Consensus.GetGovState) |
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.
#221 (comment): Ignore this as Sam says its not useful. Make sure the queries work in the cli however before merging this.
…description-fields-on-deleg-certs #221 Update description fields on delegation certificates
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