Crate bp_test_utils
source ·Expand description
Utilities for testing runtime code.
Macros
- Adds methods for testing the
set_owner()
andset_operating_mode()
for a pallet. Some values are hardcoded like:
Structs
- A test account which can be used to sign messages.
- Configuration parameters when generating test GRANDPA justifications.
Constants
- Set of test accounts with friendly names.
Functions
- Get a list of “unique” accounts.
- Convenience function to get a list of Grandpa authorities.
- Convenience function for generating a Header ID at a given block number.
- Make a valid GRANDPA justification with sensible defaults
- 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.
- Make valid proof for parachain
heads
- Create signed precommit with given target.
- Get a header for testing.
- Get a header for testing with given
state_root
. - Get the corresponding identities from the keyring for the “standard” authority set.
- Get a valid justification verification context for a GRANDPA round.
- Get a valid set of voters for a Grandpa round.