reth::consensus

Trait AsHeaderValidator

pub trait AsHeaderValidator<H>: HeaderValidator<H> {
    // Required method
    fn as_header_validator<'a>(
        self: Arc<Self>,
    ) -> Arc<dyn HeaderValidator<H> + 'a>
       where Self: 'a;
}
Expand description

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

Required Methods§

fn as_header_validator<'a>(self: Arc<Self>) -> Arc<dyn HeaderValidator<H> + 'a>
where Self: 'a,

Converts the Arc of self to Arc of HeaderValidator

Implementors§

§

impl<T, H> AsHeaderValidator<H> for T
where T: HeaderValidator<H>,