improve parachain-staking test externalities#363
Conversation
|
This makes me think I should change the pub struct GenesisConfig {
..
stakers: Vec<(AccountId, Option<AccountId>, Balance)>
}to pub struct GenesisConfig {
..
collators: Vec<(AccountId, Balance)>,
nominators: Vec<(AccountId, AccountId, Balance)>,
}This is more of a breaking change, but I do think it is objectively better. |
JoshOrndorff
left a comment
There was a problem hiding this comment.
i think this is a good change.
The diff is huge mostly becaue of the tests.rs file. Is this just the result of indentation changing because of the new builder style? Or have the tests actually changed?
Yes, the builder style caused lots of indentation changes because And No, none of the tests changed at all otherwise |
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
Co-authored-by: Joshy Orndorff <JoshOrndorff@users.noreply.github.com>
What does it do?
adds a builder pattern for parachain-staking test externalities, instead of hiding the config behind functions
This is just like in #339 CC @JoshOrndorff
Improves readability
What important points reviewers should know?
Is there something left for follow-up PRs?
make genesis more readable #363 (comment)
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?
Checklist