pub trait SourceClient<P: ParachainsPipeline>: RelayClient {
// Required methods
fn ensure_synced<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::SourceRelayChain>,
) -> Pin<Box<dyn Future<Output = Result<AvailableHeader<HeaderIdOf<P::SourceParachain>>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn prove_parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::SourceRelayChain>,
) -> Pin<Box<dyn Future<Output = Result<(ParaHeadsProof, ParaHash), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Source client used in parachain heads synchronization loop.
Required Methods§
sourcefn ensure_synced<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ensure_synced<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns Ok(true)
if client is in synced state.
sourcefn parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::SourceRelayChain>,
) -> Pin<Box<dyn Future<Output = Result<AvailableHeader<HeaderIdOf<P::SourceParachain>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::SourceRelayChain>,
) -> Pin<Box<dyn Future<Output = Result<AvailableHeader<HeaderIdOf<P::SourceParachain>>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get parachain head id at given block.
sourcefn prove_parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::SourceRelayChain>,
) -> Pin<Box<dyn Future<Output = Result<(ParaHeadsProof, ParaHash), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prove_parachain_head<'life0, 'async_trait>(
&'life0 self,
at_block: HeaderIdOf<P::SourceRelayChain>,
) -> Pin<Box<dyn Future<Output = Result<(ParaHeadsProof, ParaHash), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get parachain head proof at given block.
Object Safety§
This trait is not object safe.