Expand description
Utilities for testing runtime code.
Macros§
- generate_
owned_ bridge_ module_ tests - Adds methods for testing the
set_owner()
andset_operating_mode()
for a pallet. Some values are hardcoded like:
Structs§
- Account
- A test account which can be used to sign messages.
- Justification
Generator Params - Configuration parameters when generating test GRANDPA justifications.
Constants§
- ALICE
- Set of test accounts with friendly names: Alice.
- BOB
- Set of test accounts with friendly names: Bob.
- CHARLIE
- Set of test accounts with friendly names: Charlie.
- DAVE
- Set of test accounts with friendly names: Dave.
- EVE
- Set of test accounts with friendly names: Eve.
- FERDIE
- Set of test accounts with friendly names: Ferdie.
- PARAS_
PALLET_ NAME - Name of the
Paras
pallet used across tests. - TEST_
GRANDPA_ ROUND - GRANDPA round number used across tests.
- TEST_
GRANDPA_ SET_ ID - GRANDPA validators set id used across tests.
Functions§
- accounts
- Get a list of “unique” accounts.
- authority_
list - Convenience function to get a list of Grandpa authorities.
- header_
id - Convenience function for generating a Header ID at a given block number.
- make_
default_ justification - Make a valid GRANDPA justification with sensible defaults
- make_
justification_ for_ header - Generate justifications in a way where we are able to tune the number of pre-commits and vote ancestries which are included in the justification.
- prepare_
parachain_ heads_ proof - Make valid proof for parachain
heads
- signed_
precommit - Create signed precommit with given target.
- test_
header - Get a header for testing.
- test_
header_ with_ root - Get a header for testing with given
state_root
. - test_
keyring - Get the corresponding identities from the keyring for the “standard” authority set.
- verification_
context - Get a valid justification verification context for a GRANDPA round.
- voter_
set - Get a valid set of voters for a Grandpa round.