pub trait Fetcher<Block>: Send + Sync where
Block: Block, {
type RemoteHeaderResult: 'static + Future + Unpin + Send;
type RemoteReadResult: 'static + Future + Unpin + Send;
type RemoteCallResult: 'static + Future + Unpin + Send;
type RemoteChangesResult: 'static + Future + Unpin + Send;
type RemoteBodyResult: 'static + Future + Unpin + Send;
fn remote_header(
&self,
request: RemoteHeaderRequest<<Block as Block>::Header>
) -> Self::RemoteHeaderResult;
fn remote_read(
&self,
request: RemoteReadRequest<<Block as Block>::Header>
) -> Self::RemoteReadResult;
fn remote_read_child(
&self,
request: RemoteReadChildRequest<<Block as Block>::Header>
) -> Self::RemoteReadResult;
fn remote_call(
&self,
request: RemoteCallRequest<<Block as Block>::Header>
) -> Self::RemoteCallResult;
fn remote_changes(
&self,
request: RemoteChangesRequest<<Block as Block>::Header>
) -> Self::RemoteChangesResult;
fn remote_body(
&self,
request: RemoteBodyRequest<<Block as 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: 'static + Future + Unpin + Send
type RemoteHeaderResult: 'static + Future + Unpin + Send
Remote header future.
type RemoteReadResult: 'static + Future + Unpin + Send
type RemoteReadResult: 'static + Future + Unpin + Send
Remote storage read future.
type RemoteCallResult: 'static + Future + Unpin + Send
type RemoteCallResult: 'static + Future + Unpin + Send
Remote call result future.
type RemoteChangesResult: 'static + Future + Unpin + Send
type RemoteChangesResult: 'static + Future + Unpin + Send
Remote changes result future.
type RemoteBodyResult: 'static + Future + Unpin + Send
type RemoteBodyResult: 'static + Future + Unpin + Send
Remote block body result future.
Required methods
fn remote_header(
&self,
request: RemoteHeaderRequest<<Block as Block>::Header>
) -> Self::RemoteHeaderResult
fn remote_header(
&self,
request: RemoteHeaderRequest<<Block as Block>::Header>
) -> Self::RemoteHeaderResult
Fetch remote header.
fn remote_read(
&self,
request: RemoteReadRequest<<Block as Block>::Header>
) -> Self::RemoteReadResult
fn remote_read(
&self,
request: RemoteReadRequest<<Block as Block>::Header>
) -> Self::RemoteReadResult
Fetch remote storage value.
fn remote_read_child(
&self,
request: RemoteReadChildRequest<<Block as Block>::Header>
) -> Self::RemoteReadResult
fn remote_read_child(
&self,
request: RemoteReadChildRequest<<Block as Block>::Header>
) -> Self::RemoteReadResult
Fetch remote storage child value.
fn remote_call(
&self,
request: RemoteCallRequest<<Block as Block>::Header>
) -> Self::RemoteCallResult
fn remote_call(
&self,
request: RemoteCallRequest<<Block as Block>::Header>
) -> Self::RemoteCallResult
Fetch remote call result.
fn remote_changes(
&self,
request: RemoteChangesRequest<<Block as Block>::Header>
) -> Self::RemoteChangesResult
fn remote_changes(
&self,
request: RemoteChangesRequest<<Block as 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 as Block>::Header>
) -> Self::RemoteBodyResult
fn remote_body(
&self,
request: RemoteBodyRequest<<Block as Block>::Header>
) -> Self::RemoteBodyResult
Fetch remote block body