Trait sc_consensus_epochs::IsDescendentOfBuilder [−][src]
A builder for is_descendent_of
functions.
Associated Types
type Error: Error
[src]
The error returned by the function.
type IsDescendentOf: Fn(&Hash, &Hash) -> Result<bool, Self::Error>
[src]
A function that can tell you if the second parameter is a descendent of the first.
Required methods
fn build_is_descendent_of(
&self,
current: Option<(Hash, Hash)>
) -> Self::IsDescendentOf
[src]
&self,
current: Option<(Hash, Hash)>
) -> Self::IsDescendentOf
Build an is_descendent_of
function.
The current
parameter can be Some
with the details a fresh block whose
details aren’t yet stored, but its parent is.
The format of current
when Some
is (current, current_parent)
.
Implementors
impl<'a, H, Block> IsDescendentOfBuilder<<Block as Block>::Hash> for HeaderBackendDescendentBuilder<&'a H, Block> where
H: HeaderBackend<Block> + HeaderMetadata<Block, Error = ClientError>,
Block: BlockT,
[src]
H: HeaderBackend<Block> + HeaderMetadata<Block, Error = ClientError>,
Block: BlockT,
type Error = ClientError
type IsDescendentOf = Box<dyn Fn(&Block::Hash, &Block::Hash) -> Result<bool, ClientError> + 'a>
fn build_is_descendent_of(
&self,
current: Option<(Block::Hash, Block::Hash)>
) -> Self::IsDescendentOf
[src]
&self,
current: Option<(Block::Hash, Block::Hash)>
) -> Self::IsDescendentOf