-
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
Add MuxError handling in FoldBlocksError #548
Conversation
, LedgerStateCondition(..) | ||
, ConditionResult(..) | ||
, fromConditionResult | ||
, toConditionResult |
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 super satisfied with those names. Any suggestions are welcome here.
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.
For fromConditionResult
you could call it: isConditionMet
or wasConditionMet
. For toConditionResult
, I am not sure what could be better, one idea would be simply conditionResult
, because it is kind of a smart constructor. Or conditionResultMet
?
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.
But it doesn't look like it is being used
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.
Those names are fine to me. Explicit and not too long. I'd keep them 👍
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.
They're meant to be used in cardano-testnet
if needed. Example usage:
fooCallbck = do
...
pure $ toConditionResult isSkyBlue
or
fooCallbck = do
...
pure $ conditionResult isSkyBlue
Not sure which one is more obvious. I think I'll stick to toConditionResult
as it signals simple conversion.
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.
Looks good 👍
, LedgerStateCondition(..) | ||
, ConditionResult(..) | ||
, fromConditionResult | ||
, toConditionResult |
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.
For fromConditionResult
you could call it: isConditionMet
or wasConditionMet
. For toConditionResult
, I am not sure what could be better, one idea would be simply conditionResult
, because it is kind of a smart constructor. Or conditionResultMet
?
, LedgerStateCondition(..) | ||
, ConditionResult(..) | ||
, fromConditionResult | ||
, toConditionResult |
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.
But it doesn't look like it is being used
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.
LGTM 👍
, LedgerStateCondition(..) | ||
, ConditionResult(..) | ||
, fromConditionResult | ||
, toConditionResult |
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.
Those names are fine to me. Explicit and not too long. I'd keep them 👍
b324de5
to
c615f8a
Compare
@@ -356,13 +359,15 @@ data FoldBlocksError | |||
= FoldBlocksInitialLedgerStateError !InitialLedgerStateError |
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.
We should also change the name of this type to something like NewEpochStateError
(not necessary for this PR).
c615f8a
to
6a2f5df
Compare
Changelog
Context
Moves handling of errors removed in
to
cardano-api
. Seems that linking of epoch state logging thread sometimes results in errors:or
e.g. https://github.com/IntersectMBO/cardano-node/pull/5869/checks?check_run_id=25887156950. This change should let that error be captured by
FoldBlocksError
.Also follow-up from
to make
LedgerStateCondition
more reusable.Checklist