[][src]Trait sp_consensus::block_validation::BlockAnnounceValidator

pub trait BlockAnnounceValidator<B: Block> {
    pub fn validate(
        &mut self,
        header: &B::Header,
        data: &[u8]
    ) -> Pin<Box<dyn Future<Output = Result<Validation, Box<dyn Error + Send>>> + Send>>; }

Type which checks incoming block announcements.

Required methods

pub fn validate(
    &mut self,
    header: &B::Header,
    data: &[u8]
) -> Pin<Box<dyn Future<Output = Result<Validation, Box<dyn Error + Send>>> + Send>>
[src]

Validate the announced header and its associated data.

Note

Returning Validation::Failure will lead to a decrease of the peers reputation as it sent us invalid data.

Loading content...

Implementors

impl<B: Block> BlockAnnounceValidator<B> for DefaultBlockAnnounceValidator[src]

Loading content...