Package tests is a collection of staking backend implementation tests.
- func AddressFromString(s string) api.Address
- func GenesisState() api.Genesis
- func StakingClientImplementationTests(t *testing.T, backend api.Backend, consensus consensusAPI.Backend)
- func StakingImplementationTests(t *testing.T, backend api.Backend, consensus consensusAPI.Backend, ...)
- type AccountList
const NumAccounts = 7
NumAccounts corresponds to the number of staking accounts used in the staking genesis state as returned by GenesisState.
var Accounts = newAccountList()
Accounts stores an AccountList with staking accounts used in the staking genesis state as returned by GenesisState.
func AddressFromString ¶ added in v0.2100.0
AddressFromString returns a staking account address from its string representation or panics.
func GenesisState ¶ added in v0.2100.0
GenesisState returns a staking genesis state that can be used in tests.
StakingClientImplementationTests exercises the basic functionality of a staking client backend.
type AccountList ¶ added in v0.2100.0
type AccountList account
AccountList holds information about a list of staking accounts.
func (AccountList) GetAddress ¶ added in v0.2100.0
GetAddress returns the address of the i-th account in the list or panics.
NOTE: Indexing is 1-based, NOT 0-based.