Testing utils for staking. Provides some common functions to setup staking state, such as bonding validators, nominators, and generating different types of solutions.
- This function removes all validators and nominators from storage.
- Grab a funded user.
- Grab a funded user with max Balance.
- Create a stash and controller pair, where payouts go to a dead payee account. This is used to test worst case payout scenarios.
- Create a stash and controller pair.
- Create a stash and controller pair with fixed balance.
- Create a unique stash and controller pair.
- This function generates validators and nominators who are randomly nominating
edge_per_nominatorrandom validators (until
maxvalidators, with a seed to help unintentional prevent account collisions.
- get the current era.