[−][src]Trait tendermint_light_client::components::io::Io
Interface for fetching light blocks from a full node, typically via the RPC client.
Required methods
fn __contracts_impl_fetch_light_block(
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
Provided methods
fn fetch_light_block(
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
Fetch a light block at the given height from the peer with the given peer ID.
Postcondition
- The provider of the returned light block matches the given peer [LCV-IO-POST-PROVIDER]
Contracts
Post-condition: ret . as_ref() . map(| lb | lb . provider == peer) . unwrap_or(true)
Implementors
impl Io for ProdIo
[src]
fn __contracts_impl_fetch_light_block(
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
[src]
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
impl<F: Send> Io for F where
F: Fn(PeerId, AtHeight) -> Result<LightBlock, IoError>,
[src]
F: Fn(PeerId, AtHeight) -> Result<LightBlock, IoError>,
fn __contracts_impl_fetch_light_block(
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>
[src]
&self,
peer: PeerId,
height: AtHeight
) -> Result<LightBlock, IoError>