Trait equivocation_detector::TargetClient
source · pub trait TargetClient<P: EquivocationDetectionPipeline>: RelayClient {
// Required methods
fn best_finalized_header_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<P::TargetNumber, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn best_synced_header_hash<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<P::Hash>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn finality_verification_context<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<P::FinalityVerificationContext, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn synced_headers_finality_info<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<Vec<HeaderFinalityInfo<<P as FinalityPipeline>::FinalityProof, <P as EquivocationDetectionPipeline>::FinalityVerificationContext>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Target client used in equivocation detection loop.
Required Methods§
sourcefn best_finalized_header_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<P::TargetNumber, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn best_finalized_header_number<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<P::TargetNumber, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the best finalized header number.
sourcefn best_synced_header_hash<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<P::Hash>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn best_synced_header_hash<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<Option<P::Hash>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the hash of the best source header known by the target at the provided block number.
sourcefn finality_verification_context<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<P::FinalityVerificationContext, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn finality_verification_context<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<P::FinalityVerificationContext, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the data stored by the target at the specified block for validating source finality proofs.
sourcefn synced_headers_finality_info<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<Vec<HeaderFinalityInfo<<P as FinalityPipeline>::FinalityProof, <P as EquivocationDetectionPipeline>::FinalityVerificationContext>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn synced_headers_finality_info<'life0, 'async_trait>(
&'life0 self,
at: P::TargetNumber,
) -> Pin<Box<dyn Future<Output = Result<Vec<HeaderFinalityInfo<<P as FinalityPipeline>::FinalityProof, <P as EquivocationDetectionPipeline>::FinalityVerificationContext>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the finality info associated to the source headers synced with the target chain at the specified block.
Object Safety§
This trait is not object safe.