pub struct Verifier<D, R> { /* private fields */ }
Expand description
Verifier is responsible for validation of the blocks and headers.
Implementations§
source§impl<D, R> Verifier<D, R>where
D: PoAVerifierDatabase,
R: RelayerPort,
impl<D, R> Verifier<D, R>where D: PoAVerifierDatabase, R: RelayerPort,
sourcepub fn verify_block_fields(
&self,
consensus: &Consensus,
block: &Block
) -> Result<()>
pub fn verify_block_fields( &self, consensus: &Consensus, block: &Block ) -> Result<()>
Verifies all fields of the block based on used consensus to produce a block.
Return an error if the verification failed, otherwise Ok(())
.
sourcepub fn verify_consensus(&self, header: &SealedBlockHeader) -> bool
pub fn verify_consensus(&self, header: &SealedBlockHeader) -> bool
Verifies the consensus of the block header.
sourcepub async fn await_da_height(&self, da_height: &DaBlockHeight) -> Result<()>
pub async fn await_da_height(&self, da_height: &DaBlockHeight) -> Result<()>
Wait for the relayer to be in sync with the given DA height
if the da_height
is within the range of the current
relayer sync’d height - max_da_lag
.
Auto Trait Implementations§
impl<D, R> RefUnwindSafe for Verifier<D, R>where D: RefUnwindSafe, R: RefUnwindSafe,
impl<D, R> Send for Verifier<D, R>where D: Send, R: Send,
impl<D, R> Sync for Verifier<D, R>where D: Sync, R: Sync,
impl<D, R> Unpin for Verifier<D, R>where D: Unpin, R: Unpin,
impl<D, R> UnwindSafe for Verifier<D, R>where D: UnwindSafe, R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more