Trait BlockLocatorProvider

Source
pub trait BlockLocatorProvider<Block: BlockT> {
    // Required method
    fn block_locator(
        &self,
        from: Option<u32>,
        search_pending_block: impl Fn(u32) -> Option<BlockHash>,
    ) -> BlockLocator;
}
Expand description

A trait for retrieving block locators.

Required Methods§

Source

fn block_locator( &self, from: Option<u32>, search_pending_block: impl Fn(u32) -> Option<BlockHash>, ) -> BlockLocator

Retrieve a block locator from given height.

If from is None, the block locator is generated from the current best block.

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.

Implementations on Foreign Types§

Source§

impl<Block, Client> BlockLocatorProvider<Block> for Arc<Client>
where Block: BlockT, Client: HeaderBackend<Block> + AuxStore,

Source§

fn block_locator( &self, from: Option<u32>, search_pending_block: impl Fn(u32) -> Option<BlockHash>, ) -> BlockLocator

Implementors§