Sync channel for consensus test

This commit is contained in:
arkpar
2016-12-11 12:32:01 +01:00
parent f3af0f46be
commit c777362d02
11 changed files with 232 additions and 168 deletions

View File

@@ -183,7 +183,7 @@ impl ChainNotify for Informant {
let ripe = Instant::now() > *last_import + Duration::from_secs(1) && !importing;
let txs_imported = imported.iter()
.take(imported.len().saturating_sub(if ripe { 1 } else { 0 }))
.filter_map(|h| self.client.block(BlockID::Hash(*h)))
.filter_map(|h| self.client.block(BlockId::Hash(*h)))
.map(|b| BlockView::new(&b).transactions_count())
.sum();