[][src]Function sc_client::utils::is_descendent_of

pub fn is_descendent_of<Block, T>(
    client: &'a T,
    current: Option<(<Block as Block>::Hash, <Block as Block>::Hash)>
) -> impl Fn(&<Block as Block>::Hash, &<Block as Block>::Hash) + 'a where
    Block: Block,
    T: HeaderBackend<Block> + HeaderMetadata<Block, Error = Error>, 

Returns a function for checking block ancestry, the returned function will return true if the given hash (second parameter) is a descendent of the base (first parameter). If the current parameter is defined, it should represent the current block hash and its parent hash, if given the function that's returned will assume that hash isn't part of the local DB yet, and all searches in the DB will instead reference the parent.