Trait hotshot_types::data::TestableLeaf

source ·
pub trait TestableLeaf {
    type NodeType: NodeType;

    // Required method
    fn create_random_transaction(
        &self,
        rng: &mut dyn RngCore,
        padding: u64,
    ) -> <<Self::NodeType as NodeType>::BlockPayload as BlockPayload<Self::NodeType>>::Transaction;
}
Expand description

Additional functions required to use a Leaf with hotshot-testing.

Required Associated Types§

source

type NodeType: NodeType

Type of nodes participating in the network.

Required Methods§

source

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

Create a transaction that can be added to the block contained in this leaf.

Implementors§

source§

impl<TYPES: NodeType> TestableLeaf for Leaf2<TYPES>
where TYPES::ValidatedState: TestableState<TYPES>, TYPES::BlockPayload: TestableBlock<TYPES>,

source§

type NodeType = TYPES

source§

impl<TYPES: NodeType> TestableLeaf for Leaf<TYPES>
where TYPES::ValidatedState: TestableState<TYPES>, TYPES::BlockPayload: TestableBlock<TYPES>,

source§

type NodeType = TYPES