Сryptocurrency development analysis


This tests that the fix for CBR-369 in https://github.com/input-output-hk/cardano-sl/pull/3418 is indeed correct.

This also extends the tests so where we use `equivalentT` to verify the real implementation against the model, we do this twice: once without the wallet worker (testing rollback directly), and once with the wallet worker (aggregating rollback/applyBlock events to get switchToFork events). Made a few other changes that were required as a result, including some fixes to the generator. Details in the commit messages.

## Linked issue


## Type of change

— [ ] 🐞 Bug fix (non-breaking change which fixes an issue)
— [ ] 🛠 New feature (non-breaking change which adds functionality)
— [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
— [ ] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
— [x] 🔨 New or improved tests for existing code
— [ ] ⛑ git-flow chore (backport, hotfix, etc)

## Developer checklist

— [ ] I have read the [style guide](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/style-guide.md) document, and my code follows the code style of this project.
— [ ] If my code deals with exceptions, it follows the [guidelines](https://github.com/input-output-hk/cardano-sl/blob/develop/docs/exceptions.md).
— [ ] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on [cardanodocs.com](https://github.com/input-output-hk/cardanodocs.com), amending the inline [Haddock](https://www.haskell.org/haddock/) comments, any relevant README file or one of the document listed in the [docs](https://github.com/input-output-hk/cardano-sl/tree/develop/docs) directory.
— [ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

## Testing checklist

— [ ] I have added tests to cover my changes.
— [ ] All new and existing tests passed.

## QA Steps

## Screenshots (if available)

You can view, comment on, or merge this pull request online at:


— Commit Summary —

* [CBR-383] Write tests for submission layer updates
* [CBR-383] Test `switchToFork` using walletworker
* [CBR-383] Fix generator

— File Changes —

M wallet-new/cardano-sl-wallet-new.cabal (4)
M wallet-new/src/Cardano/Wallet/Kernel/Actions.hs (43)
M wallet-new/src/Cardano/Wallet/Kernel/DB/HdWallet.hs (154)
M wallet-new/src/Cardano/Wallet/Kernel/DB/HdWallet/Read.hs (9)
M wallet-new/src/Cardano/Wallet/Kernel/DB/Read.hs (5)
A wallet-new/src/Cardano/Wallet/Kernel/Invariants.hs (83)
M wallet-new/src/Cardano/Wallet/Kernel/Submission.hs (4)
M wallet-new/src/Cardano/Wallet/WalletLayer/Kernel.hs (2)
M wallet-new/test/unit/Test/Spec/BlockMetaScenarios.hs (4)
M wallet-new/test/unit/Test/Spec/Kernel.hs (76)
M wallet-new/test/unit/Test/Spec/WalletWorker.hs (11)
M wallet-new/test/unit/UTxO/Interpreter.hs (19)
M wallet-new/test/unit/Wallet/Abstract.hs (6)
M wallet-new/test/unit/Wallet/Inductive/Cardano.hs (83)
A wallet-new/test/unit/Wallet/Inductive/ExtWalletEvent.hs (105)
M wallet-new/test/unit/Wallet/Inductive/Generator.hs (36)
M wallet-new/test/unit/Wallet/Inductive/History.hs (7)
M wallet-new/test/unit/Wallet/Inductive/Validation.hs (5)

— Patch Links —


Добавить комментарий