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§
Sourcefn block_locator(
&self,
from: Option<u32>,
search_pending_block: impl Fn(u32) -> Option<BlockHash>,
) -> BlockLocator
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.