Trait hotshot_types::traits::states::TestableState

source ·
pub trait TestableState<TYPES>: ValidatedState<TYPES>
where TYPES: NodeType, TYPES::BlockPayload: TestableBlock<TYPES>,
{ // Required method fn create_random_transaction( state: Option<&Self>, rng: &mut dyn RngCore, padding: u64, ) -> <TYPES::BlockPayload as BlockPayload<TYPES>>::Transaction; }
Expand description

extra functions required on state to be usable by hotshot-testing

Required Methods§

source

fn create_random_transaction( state: Option<&Self>, rng: &mut dyn RngCore, padding: u64, ) -> <TYPES::BlockPayload as BlockPayload<TYPES>>::Transaction

Creates random transaction if possible otherwise panics padding is the bytes of padding to add to the transaction

Object Safety§

This trait is not object safe.

Implementors§