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:
Robert Habermeier
2017-02-06 17:21:35 +01:00
committed by Arkadiy Paronyan
parent 127baed385
commit 4172a5369c
12 changed files with 261 additions and 95 deletions

View File

@@ -552,7 +552,7 @@ impl BlockChainClient for TestBlockChainClient {
let mut adding = false;
let mut blocks = Vec::new();
for (_, hash) in numbers_read.iter().sort_by(|tuple1, tuple2| tuple1.0.cmp(tuple2.0)) {
for (_, hash) in numbers_read.iter().sorted_by(|tuple1, tuple2| tuple1.0.cmp(tuple2.0)) {
if hash == to {
if adding {
blocks.push(hash.clone());