Module pallet_staking::testing_utils
source · Expand description
Testing utils for staking. Provides some common functions to setup staking state, such as bonding validators, nominators, and generating different types of solutions.
Functions§
- 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.
- create
max
validators. - This function generates validators and nominators who are randomly nominating
edge_per_nominator
random validators (untilto_nominate
if provided). - create
max
validators, with a seed to help unintentional prevent account collisions. - get the current era.