Trait sc_client_api::light::Fetcher [−][src]
pub trait Fetcher<Block: BlockT>: Send + Sync { type RemoteHeaderResult: Future<Output = Result<Block::Header, ClientError>> + Unpin + Send + 'static; type RemoteReadResult: Future<Output = Result<HashMap<Vec<u8>, Option<Vec<u8>>>, ClientError>> + Unpin + Send + 'static; type RemoteCallResult: Future<Output = Result<Vec<u8>, ClientError>> + Unpin + Send + 'static; type RemoteChangesResult: Future<Output = Result<Vec<(NumberFor<Block>, u32)>, ClientError>> + Unpin + Send + 'static; type RemoteBodyResult: Future<Output = Result<Vec<Block::Extrinsic>, ClientError>> + Unpin + Send + 'static; fn remote_header(
&self,
request: RemoteHeaderRequest<Block::Header>
) -> Self::RemoteHeaderResult; fn remote_read(
&self,
request: RemoteReadRequest<Block::Header>
) -> Self::RemoteReadResult; fn remote_read_child(
&self,
request: RemoteReadChildRequest<Block::Header>
) -> Self::RemoteReadResult; fn remote_call(
&self,
request: RemoteCallRequest<Block::Header>
) -> Self::RemoteCallResult; fn remote_changes(
&self,
request: RemoteChangesRequest<Block::Header>
) -> Self::RemoteChangesResult; fn remote_body(
&self,
request: RemoteBodyRequest<Block::Header>
) -> Self::RemoteBodyResult; }
Expand description
Light client data fetcher. Implementations of this trait must check if remote data is correct (see FetchedDataChecker) and return already checked data.
Associated Types
type RemoteHeaderResult: Future<Output = Result<Block::Header, ClientError>> + Unpin + Send + 'static
type RemoteHeaderResult: Future<Output = Result<Block::Header, ClientError>> + Unpin + Send + 'static
Remote header future.
Remote storage read future.
type RemoteCallResult: Future<Output = Result<Vec<u8>, ClientError>> + Unpin + Send + 'static
type RemoteCallResult: Future<Output = Result<Vec<u8>, ClientError>> + Unpin + Send + 'static
Remote call result future.
Remote changes result future.
type RemoteBodyResult: Future<Output = Result<Vec<Block::Extrinsic>, ClientError>> + Unpin + Send + 'static
type RemoteBodyResult: Future<Output = Result<Vec<Block::Extrinsic>, ClientError>> + Unpin + Send + 'static
Remote block body result future.
Required methods
fn remote_header(
&self,
request: RemoteHeaderRequest<Block::Header>
) -> Self::RemoteHeaderResult
fn remote_header(
&self,
request: RemoteHeaderRequest<Block::Header>
) -> Self::RemoteHeaderResult
Fetch remote header.
fn remote_read(
&self,
request: RemoteReadRequest<Block::Header>
) -> Self::RemoteReadResult
fn remote_read(
&self,
request: RemoteReadRequest<Block::Header>
) -> Self::RemoteReadResult
Fetch remote storage value.
fn remote_read_child(
&self,
request: RemoteReadChildRequest<Block::Header>
) -> Self::RemoteReadResult
fn remote_read_child(
&self,
request: RemoteReadChildRequest<Block::Header>
) -> Self::RemoteReadResult
Fetch remote storage child value.
fn remote_call(
&self,
request: RemoteCallRequest<Block::Header>
) -> Self::RemoteCallResult
fn remote_call(
&self,
request: RemoteCallRequest<Block::Header>
) -> Self::RemoteCallResult
Fetch remote call result.
fn remote_changes(
&self,
request: RemoteChangesRequest<Block::Header>
) -> Self::RemoteChangesResult
fn remote_changes(
&self,
request: RemoteChangesRequest<Block::Header>
) -> Self::RemoteChangesResult
Fetch remote changes ((block number, extrinsic index)) where given key has been changed at a given blocks range.
fn remote_body(
&self,
request: RemoteBodyRequest<Block::Header>
) -> Self::RemoteBodyResult
fn remote_body(
&self,
request: RemoteBodyRequest<Block::Header>
) -> Self::RemoteBodyResult
Fetch remote block body