[][src]Trait sp_consensus::Environment

pub trait Environment<B: BlockT> {
    type Proposer: Proposer<B> + Send + 'static;
    type CreateProposer: Future<Output = Result<Self::Proposer, Self::Error>> + Send + Unpin + 'static;
    type Error: From<Error> + Debug + 'static;
    pub fn init(&mut self, parent_header: &B::Header) -> Self::CreateProposer;
}

Environment for a Consensus instance.

Creates proposer instance.

Associated Types

type Proposer: Proposer<B> + Send + 'static[src]

The proposer type this creates.

type CreateProposer: Future<Output = Result<Self::Proposer, Self::Error>> + Send + Unpin + 'static[src]

A future that resolves to the proposer.

type Error: From<Error> + Debug + 'static[src]

Error which can occur upon creation.

Loading content...

Required methods

pub fn init(&mut self, parent_header: &B::Header) -> Self::CreateProposer[src]

Initialize the proposal logic on top of a specific header. Provide the authorities at that header.

Loading content...

Implementors

Loading content...