Trait subcoin_primitives::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.

Object Safety§

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§