-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make GenesisMaterial usable by any node
This commit makes GenesisMaterial fully fixed. It no longer accepts an amount parameter or any parameter. This means that every node of every type (mint, spentbook, wallet, audit) can know the GenesisMaterial without need to consult any other node, so it greatly simplifies coordination. For now, the GENESIS_AMOUNT is set to u64::MAX. This takes full advantage of the u64 range. It also caused some tests to break because they use the genesis amount as a starting point and then increment. Such tests were fixed by first reissuing to an intermediate "starting_dbc" of the desired value. * use GenesisMaterial in SpentBookNodeMock * remove SpentBookNodeMock::set_genesis() * remove MintNode::GenesisDbcShare * remove MintNode::issue_genesis_dbc() * modify mismatched test to avoid int overflow * GenesisMaterial::new --> default() * define GENESIS_AMOUNT to u64::MAX * derive Default for GenesisBuilderMock * modify GenesisBuilderMock to build using GenesisMaterial * remove ability to choose genesis amount in mint-repl * modify reissue bench to first generate a dbc of value 100. * modify prop_dbc_validation() to first generate a dbc of value 100 to avoid integer overflow.
- Loading branch information
Showing
8 changed files
with
263 additions
and
271 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
Oops, something went wrong.