-
Notifications
You must be signed in to change notification settings - Fork 720
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
Update checkStakeKeyRegistered
to use foldEpochState
#5735
Update checkStakeKeyRegistered
to use foldEpochState
#5735
Conversation
1b9cbaa
to
2a31775
Compare
checkStakeKeyRegistered
to use foldEpochState
H.failWithCustom GHC.callStack Nothing | ||
$ unlines [ "Stake address in question: " | ||
, Text.unpack (serialiseToBech32 sAddr) | ||
, "was not registered" | ||
, "Current stake info for address in question: " | ||
, show $ map serialiseToBech32 $ Map.keys rewardsMap | ||
, "foldEpochStateError: " <> show e | ||
] |
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.
Providing a detailed error message, nice 👍
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'm not familiar with the part of the ledger's state being accessed, but this LGTM
pledgerStakeInfo <- H.leftFailM $ H.readJsonFile oFpAbs | ||
(DelegationsAndRewards (rewardsMap, _delegMap)) | ||
<- H.noteShowM $ H.jsonErrorFail $ Aeson.fromJSON @DelegationsAndRewards pledgerStakeInfo |
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 be simplified a bit
pledgerStakeInfo <- H.leftFailM $ H.readJsonFile oFpAbs | |
(DelegationsAndRewards (rewardsMap, _delegMap)) | |
<- H.noteShowM $ H.jsonErrorFail $ Aeson.fromJSON @DelegationsAndRewards pledgerStakeInfo | |
(DelegationsAndRewards (rewardsMap, _delegMap)) <- H.noteShowM $ H.readJsonFileOk oFpAbs |
-- TODO: Currently we can't propagate the error message thrown by checkStakeKeyRegistered when using byDurationM | ||
-- Instead we wait 15 seconds |
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 TODO is obsolete now
-- TODO: Currently we can't propagate the error message thrown by checkStakeKeyRegistered when using byDurationM | |
-- Instead we wait 15 seconds | |
-- TODO: Currently we can't propagate the error message thrown by checkStakeKeyRegistered when using byDurationM | |
-- Instead we wait 15 seconds |
2a31775
to
537398e
Compare
315143e
to
4d2913c
Compare
There are build failures in merge queue https://github.com/IntersectMBO/cardano-node/actions/runs/8605681309/job/23582460168#step:13:594 |
df25397
to
4d11b5e
Compare
4d11b5e
to
71537f5
Compare
Description
Add your description here, if it fixes a particular issue please provide a
link
to the issue.
Checklist
See Runnings tests for more details
CHANGELOG.md
for affected package.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.