reth::builder::components

Trait ConsensusBuilder

Source
pub trait ConsensusBuilder<Node>: Send
where Node: FullNodeTypes,
{ type Consensus: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + 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: FullConsensus<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives> + 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 as FullNodeTypes>::Types: NodeTypes<ChainSpec = ChainSpec, Primitives = EthPrimitives>, Node: FullNodeTypes,

Implementors§

Source§

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

Source§

type Consensus = Consensus