reth::builder::components

Trait ConsensusBuilder

Source
pub trait ConsensusBuilder<Node>: Send
where Node: FullNodeTypes,
{ type Consensus: Consensus + Clone + Unpin + 'static; // Required method fn build_consensus( self, ctx: &BuilderContext<Node>, ) -> impl Future<Output = Result<Self::Consensus, Report>> + Send; }
Expand description

A type that knows how to build the consensus implementation.

Required Associated Types§

Source

type Consensus: Consensus + Clone + Unpin + 'static

The consensus implementation to build.

Required Methods§

Source

fn build_consensus( self, ctx: &BuilderContext<Node>, ) -> impl Future<Output = Result<Self::Consensus, Report>> + Send

Creates the consensus implementation.

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.

Implementations on Foreign Types§

Source§

impl<Node> ConsensusBuilder<Node> for EthereumConsensusBuilder
where Node: FullNodeTypes, <Node as FullNodeTypes>::Types: NodeTypes<ChainSpec = ChainSpec>,

Implementors§

Source§

impl<Node, F, Fut, Consensus> ConsensusBuilder<Node> for F
where Node: FullNodeTypes, Consensus: Consensus + Clone + Unpin + 'static, F: FnOnce(&BuilderContext<Node>) -> Fut + Send, Fut: Future<Output = Result<Consensus, Report>> + Send,

Source§

type Consensus = Consensus