Struct sc_light::fetcher::LightDataChecker [−][src]
pub struct LightDataChecker<E, B: BlockT, S: BlockchainStorage<B>> { /* fields omitted */ }
Expand description
Remote data checker.
Implementations
pub fn new(
blockchain: Arc<Blockchain<S>>,
executor: E,
spawn_handle: Box<dyn SpawnNamed>
) -> Self
pub fn new(
blockchain: Arc<Blockchain<S>>,
executor: E,
spawn_handle: Box<dyn SpawnNamed>
) -> SelfCreate new light data checker.
pub fn check_changes_proof_with_cht_size(
&self,
request: &RemoteChangesRequest<B::Header>,
remote_proof: ChangesProof<B::Header>,
cht_size: NumberFor<B>
) -> ClientResult<Vec<(NumberFor<B>, u32)>>
pub fn check_changes_proof_with_cht_size(
&self,
request: &RemoteChangesRequest<B::Header>,
remote_proof: ChangesProof<B::Header>,
cht_size: NumberFor<B>
) -> ClientResult<Vec<(NumberFor<B>, u32)>>Check remote changes query proof assuming that CHT-s are of given size.
pub fn check_changes_tries_proof(
&self,
cht_size: NumberFor<B>,
remote_roots: &BTreeMap<NumberFor<B>, B::Hash>,
remote_roots_proof: StorageProof
) -> ClientResult<()>
pub fn check_changes_tries_proof(
&self,
cht_size: NumberFor<B>,
remote_roots: &BTreeMap<NumberFor<B>, B::Hash>,
remote_roots_proof: StorageProof
) -> ClientResult<()>Check CHT-based proof for changes tries roots.
Trait Implementations
impl<E, Block, S> FetchChecker<Block> for LightDataChecker<E, Block, S> where
Block: BlockT,
E: CodeExecutor + Clone + 'static,
S: BlockchainStorage<Block>,
impl<E, Block, S> FetchChecker<Block> for LightDataChecker<E, Block, S> where
Block: BlockT,
E: CodeExecutor + Clone + 'static,
S: BlockchainStorage<Block>, fn check_header_proof(
&self,
request: &RemoteHeaderRequest<Block::Header>,
remote_header: Option<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<Block::Header>
fn check_header_proof(
&self,
request: &RemoteHeaderRequest<Block::Header>,
remote_header: Option<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<Block::Header>Check remote header proof.
fn check_read_proof(
&self,
request: &RemoteReadRequest<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<HashMap<Vec<u8>, Option<Vec<u8>>>>
fn check_read_proof(
&self,
request: &RemoteReadRequest<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<HashMap<Vec<u8>, Option<Vec<u8>>>>Check remote storage read proof.
fn check_read_child_proof(
&self,
request: &RemoteReadChildRequest<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<HashMap<Vec<u8>, Option<Vec<u8>>>>
fn check_read_child_proof(
&self,
request: &RemoteReadChildRequest<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<HashMap<Vec<u8>, Option<Vec<u8>>>>Check remote storage read proof.
fn check_execution_proof(
&self,
request: &RemoteCallRequest<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<Vec<u8>>
fn check_execution_proof(
&self,
request: &RemoteCallRequest<Block::Header>,
remote_proof: StorageProof
) -> ClientResult<Vec<u8>>Check remote method execution proof.
fn check_changes_proof(
&self,
request: &RemoteChangesRequest<Block::Header>,
remote_proof: ChangesProof<Block::Header>
) -> ClientResult<Vec<(NumberFor<Block>, u32)>>
fn check_changes_proof(
&self,
request: &RemoteChangesRequest<Block::Header>,
remote_proof: ChangesProof<Block::Header>
) -> ClientResult<Vec<(NumberFor<Block>, u32)>>Check remote changes query proof.
fn check_body_proof(
&self,
request: &RemoteBodyRequest<Block::Header>,
body: Vec<Block::Extrinsic>
) -> ClientResult<Vec<Block::Extrinsic>>
fn check_body_proof(
&self,
request: &RemoteBodyRequest<Block::Header>,
body: Vec<Block::Extrinsic>
) -> ClientResult<Vec<Block::Extrinsic>>Check remote body proof.
Auto Trait Implementations
impl<E, B, S> !RefUnwindSafe for LightDataChecker<E, B, S>impl<E, B, S> Send for LightDataChecker<E, B, S> where
E: Send, impl<E, B, S> Sync for LightDataChecker<E, B, S> where
E: Sync, impl<E, B, S> Unpin for LightDataChecker<E, B, S> where
B: Unpin,
E: Unpin, impl<E, B, S> !UnwindSafe for LightDataChecker<E, B, S>Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any, Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
pub fn vzip(self) -> VAttaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more