-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convenient and High-fidelity Transaction Processing Tests (#2730)
* Convenient and High-fidelity Transaction Processing Tests This refactors some of the `ledger` code so that it's convenient to write short tests that operate on a fairly complete ledger, including rewards payouts. Previously, tests used genesis(), but genesis() build the genesis block internally "by hand" rather than using MakeGenesisBlock, so it missed some details (like setting up RewardsState). Presumably, this was because MakeGenesisBlock was in the `data` package, and could not be imported. That is the motivation behind moving it, and some related code, to bookkeeping (where various Genesis related code already existed). The txntest packaged is motivated purely by a desire for more concise tests. It allows for the construction of transaction.Transaction objects concisely, and we can add all sort of conveneince routines here that would not make sense in the production code (turning these into SignedTxns, SignedTxnWithADs, TransactionGroups, etc). * Converted a test, went from 130 lines to 68. Same test. * Docs and and another test converted
- Loading branch information
Showing
15 changed files
with
618 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.