[][src]Function sc_service::client::light::fetcher::cht::compute_root

pub fn compute_root<Header, Hasher, I>(
    cht_size: <Header as Header>::Number,
    cht_num: <Header as Header>::Number,
    hashes: I
) -> Result<<Hasher as Hasher>::Out, Error> where
    Hasher: Hasher,
    Header: Header,
    I: IntoIterator<Item = Result<Option<<Header as Header>::Hash>, Error>>,
    <Hasher as Hasher>::Out: Ord

Compute a CHT root from an iterator of block hashes. Fails if shorter than SIZE items. The items are assumed to proceed sequentially from start_number(cht_num). Discards the trie's nodes.