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§
Required Methods§
Sourcefn find_block_number(
&self,
compare_strategy: CS,
) -> Result<NumberFor<Block>, Self::Error>
fn find_block_number( &self, compare_strategy: CS, ) -> Result<NumberFor<Block>, Self::Error>
Finds the number of the block satisfying compare_strategy
Sourcefn find_block(&self, compare_strategy: CS) -> Result<Block::Hash, Self::Error>
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.