pub trait BlockVerifier: Send + Sync {
// Required method
fn verify_block_fields(
&self,
consensus: &Consensus,
block: &Block,
) -> Result<()>;
}
Expand description
The verifier of the block.
Required Methods§
sourcefn verify_block_fields(
&self,
consensus: &Consensus,
block: &Block,
) -> Result<()>
fn verify_block_fields( &self, consensus: &Consensus, block: &Block, ) -> Result<()>
Verifies the consistency of the block fields for the block’s height. It includes the verification of all fields, it includes the consensus rules for the corresponding height.
Return an error if the verification failed, otherwise Ok(())
.