reth::consensus

Trait AsConsensus

pub trait AsConsensus<H, B>: Consensus<H, B> {
    // Required method
    fn as_consensus<'a>(self: Arc<Self>) -> Arc<dyn Consensus<H, B> + 'a>
       where Self: 'a;
}
Expand description

Helper trait to cast Arc<dyn FullConsensus> to Arc<dyn Consensus>

Required Methods§

fn as_consensus<'a>(self: Arc<Self>) -> Arc<dyn Consensus<H, B> + 'a>
where Self: 'a,

Converts the Arc of self to Arc of HeaderValidator

Implementors§

§

impl<T, H, B> AsConsensus<H, B> for T
where T: Consensus<H, B>,