Trait 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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§