ConwayCERTS: Predicate failure for incomplete withdrawals#5279
ConwayCERTS: Predicate failure for incomplete withdrawals#5279
Conversation
e916734 to
8b75109
Compare
Conditional upon protocol version 11. Adjust the relevant tests.
8b75109 to
b0f397a
Compare
teodanciu
left a comment
There was a problem hiding this comment.
Some questions from me.
It looks good to me, but I don't entirely trust myself to approve the tuple business and the bangs usage in collectBadWithdrawals, so I'll leave to Alexey to approve.
| Just accountState | ||
| | raNetwork /= networkId -> | ||
| first (Map.insert ra withdrawalAmount) accum | ||
| | fromCompact (accountState ^. balanceAccountStateL) /= withdrawalAmount -> |
There was a problem hiding this comment.
If it's both in the wrong network and the amount is incorrect, it's enough to return a predicate for the former?
| accum@(!_, !_) = | ||
| case Map.lookup raCredential (accounts ^. accountsMapL) of | ||
| Nothing -> | ||
| first (Map.insert ra withdrawalAmount) accum |
There was a problem hiding this comment.
Interesting, TIL about this.
Just curious, is there any advantage in doing this rather than binding the two components of the tuple and then using the first one here?
| @@ -2,6 +2,7 @@ | |||
|
|
|||
| ## 1.20.0.0 | |||
There was a problem hiding this comment.
As the ledger release happened, we'll have to change the version in the cabal file to 1.20.1.0 (or maybe even 1.21.1.0?) , and then also the headline in the CHANGELOG.
|
|
||
| ## 1.20.0.0 | ||
|
|
||
| * Add `IncompleteWithdrawalsCERTS` to `ConwayPredFailure`. |
There was a problem hiding this comment.
You could also mention hardforkConwayCERTSIncompleteWithdrawals
| * Add `IncompleteWithdrawalsCERTS` to `ConwayPredFailure`. | |
| * Add `IncompleteWithdrawalsCERTS` to `ConwayPredFailure`. | |
| * Add `hardforkConwayCERTSIncompleteWithdrawals` |
|
Closing in favour of #5291 |
Description
Add
IncompleteWithdrawalsCERTStoConwayPredFailureconditional upon protocol version 11, viahardforkConwayCERTSIncompleteWithdrawals.Closes #4640
Checklist
CHANGELOG.mdfiles updated for packages with externally visible changes.NOTE: New section is never added with the code changes. (See RELEASING.md).
Versions updated in.cabalandCHANGELOG.mdfiles when necessary, according to theversioning process.
Version bounds in.cabalfiles updated when necessary.NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
scripts/fourmolize.sh).scripts/cabal-format.sh).scripts/gen-cddl.sh)hie.yamlupdated (usescripts/gen-hie.sh).