pub trait Environment<B>where
B: Block,{
type Proposer: Proposer<B> + Send + 'static;
type CreateProposer: Future<Output = Result<Self::Proposer, Self::Error>> + Send + Unpin + 'static;
type Error: From<Error> + Error + 'static;
// Required method
fn init(
&mut self,
parent_header: &<B as Block>::Header,
) -> Self::CreateProposer;
}
Expand description
Environment for a Consensus instance.
Creates proposer instance.
Required Associated Types§
Required Methods§
sourcefn init(&mut self, parent_header: &<B as Block>::Header) -> Self::CreateProposer
fn init(&mut self, parent_header: &<B as Block>::Header) -> Self::CreateProposer
Initialize the proposal logic on top of a specific header. Provide the authorities at that header.