Expand description
A set of primitive constructors, to aid in crafting meaningful testcase while reducing repetition.
Note that dummy_
prefixed values are meant to be fillers, that should not matter, and will
contain randomness based data.
Re-exports§
pub use rand;
Structs§
- Always
Zero Rng - A special
Rng
that always returns zero for testing something that implied to be random but should not be random in the tests - Test
Candidate Builder - Builder for
CandidateReceipt
.
Functions§
- dummy_
candidate_ commitments - Create candidate commitments with filler data.
- dummy_
candidate_ descriptor - Create a candidate descriptor with filler data.
- dummy_
candidate_ descriptor_ bad_ sig - Create a candidate descriptor with a bogus signature and filler data.
- dummy_
candidate_ descriptor_ v2 - Create a v2 candidate descriptor with filler data.
- dummy_
candidate_ receipt - Creates a candidate receipt with filler data.
- dummy_
candidate_ receipt_ bad_ sig - Create a candidate receipt with a bogus signature and filler data. Optionally set the commitment
hash with the
commitments
arg. - dummy_
candidate_ receipt_ v2 - Creates a v2 candidate receipt with filler data.
- dummy_
candidate_ receipt_ v2_ bad_ sig - Create a candidate receipt with a bogus signature and filler data. Optionally set the commitment
hash with the
commitments
arg. - dummy_
collator - Create a meaningless collator id.
- dummy_
collator_ signature - Create a meaningless collator signature. It is important to not be 0, as we’d confuse v1 and v2 descriptors.
- dummy_
committed_ candidate_ receipt - Creates a committed candidate receipt with filler data.
- dummy_
committed_ candidate_ receipt_ v2 - Creates a v2 committed candidate receipt with filler data.
- dummy_
digest - Create meaningless dummy digest.
- dummy_
hash - Create meaningless dummy hash.
- dummy_
head_ data - Create meaningless head data.
- dummy_
pvd - Create a meaningless persisted validation data.
- dummy_
signature - Creates a meaningless signature
- dummy_
validation_ code - Create meaningless validation code.
- dummy_
validator - Create a meaningless validator id.
- make_
candidate - Create a meaningless candidate, returning its receipt and PVD.
- make_
candidate_ v2 - Create a meaningless v2 candidate, returning its receipt and PVD.
- make_
valid_ candidate_ descriptor - Create a new candidate descriptor, and apply a valid signature
using the provided
collator
key. - make_
valid_ candidate_ descriptor_ v2 - Create a v2 candidate descriptor.
- resign_
candidate_ descriptor_ with_ collator - After manually modifying the candidate descriptor, resign with a defined collator key.
- validator_
pubkeys - Extracts validators’s public keys (
ValidatorId
) fromSr25519Keyring
- zero_
collator_ signature - Create a zeroed collator signature.