Include total difficulty in CHTs and hide implementation details from consumers (#4428)
* CHT builder and prover * use CHT abstraction in provider * hide CHT internals from header chain * fix itertools conflict by updating all to 0.5 * cht proof checker, use it in on_demand
This commit is contained in:
committed by
Arkadiy Paronyan
parent
127baed385
commit
4172a5369c
@@ -77,7 +77,9 @@ pub fn ordered_trie_root<I>(input: I) -> H256
|
||||
/// assert_eq!(trie_root(v), H256::from_str(root).unwrap());
|
||||
/// }
|
||||
/// ```
|
||||
pub fn trie_root(input: Vec<(Vec<u8>, Vec<u8>)>) -> H256 {
|
||||
pub fn trie_root<I>(input: I) -> H256
|
||||
where I: IntoIterator<Item=(Vec<u8>, Vec<u8>)>
|
||||
{
|
||||
let gen_input = input
|
||||
// first put elements into btree to sort them and to remove duplicates
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user