Trait sp_consensus::block_validation::BlockAnnounceValidator [−][src]
Type which checks incoming block announcements.
Required methods
fn validate(
&mut self,
header: &B::Header,
data: &[u8]
) -> Pin<Box<dyn Future<Output = Result<Validation, Box<dyn Error + Send>>> + Send>>
[src]
&mut self,
header: &B::Header,
data: &[u8]
) -> Pin<Box<dyn Future<Output = Result<Validation, Box<dyn Error + Send>>> + Send>>
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.
The returned future should only resolve to an error iff there was an internal error validating
the block announcement. If the block announcement itself is invalid, this should always
return Validation::Failure
.