[][src]Trait blockchain::traits::BuilderExecutor

pub trait BuilderExecutor {
type Error: Error + 'static;
type Block: Block;
type BuildBlock;
type Externalities: ?Sized;
type Inherent;
type Extrinsic;
    fn initialize_block(
        &self,
        parent_block: &Self::Block,
        state: &mut Self::Externalities,
        inherent: Self::Inherent
    ) -> Result<Self::BuildBlock, Self::Error>;
fn apply_extrinsic(
        &self,
        block: &mut Self::BuildBlock,
        extrinsic: Self::Extrinsic,
        state: &mut Self::Externalities
    ) -> Result<(), Self::Error>;
fn finalize_block(
        &self,
        block: &mut Self::BuildBlock,
        state: &mut Self::Externalities
    ) -> Result<(), Self::Error>; }

Builder executor

Associated Types

type Error: Error + 'static

Error type

type Block: Block

Block type

type BuildBlock

Build block type

type Externalities: ?Sized

Externalities type

type Inherent

Inherent

type Extrinsic

Extrinsic

Loading content...

Required methods

fn initialize_block(
    &self,
    parent_block: &Self::Block,
    state: &mut Self::Externalities,
    inherent: Self::Inherent
) -> Result<Self::BuildBlock, Self::Error>

Initialize a block from the parent block, and given state.

fn apply_extrinsic(
    &self,
    block: &mut Self::BuildBlock,
    extrinsic: Self::Extrinsic,
    state: &mut Self::Externalities
) -> Result<(), Self::Error>

Apply extrinsic to a given block.

fn finalize_block(
    &self,
    block: &mut Self::BuildBlock,
    state: &mut Self::Externalities
) -> Result<(), Self::Error>

Finalize a block.

Loading content...

Implementors

Loading content...