Module pallet_staking::testing_utils[][src]

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.

Create a stash and controller pair, where the controller is dead, and payouts go to controller. This is used to test worst case payout scenarios.

Create a stash and controller pair.

create max validators.

This function generates validators and nominators who are randomly nominating edge_per_nominator random validators (until to_nominate if provided).

get the current era.