Trait FindSidechainBlock

Source
pub trait FindSidechainBlock<Block: BlockT, CS: CompareStrategy<Block, Self>>: Client<Block> + Sized {
    type Error: Error;

    // Required methods
    fn find_block_number(
        &self,
        compare_strategy: CS,
    ) -> Result<NumberFor<Block>, Self::Error>;
    fn find_block(
        &self,
        compare_strategy: CS,
    ) -> Result<Block::Hash, Self::Error>;
}
Expand description

Runtime client capable of finding Partner Chain blocks via binary search using some CompareStrategy.

Required Associated Types§

Source

type Error: Error

Error type

Required Methods§

Source

fn find_block_number( &self, compare_strategy: CS, ) -> Result<NumberFor<Block>, Self::Error>

Finds the number of the block satisfying compare_strategy

Source

fn find_block(&self, compare_strategy: CS) -> Result<Block::Hash, Self::Error>

Finds the hash of the block satisfying compare_strategy

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C, Block, CS> FindSidechainBlock<Block, CS> for C
where C: Client<Block> + Send + Sync + 'static, Block: BlockT, NumberFor<Block>: From<u32> + Into<u32>, CS: CompareStrategy<Block, Self>,

Source§

type Error = ApiError