Function sc_client_api::cht::compute_root[][src]

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

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.