Header-only sync for old forks (#3942)

* Header-only sync for old forks

* Simplified blocks-count

* Update core/consensus/common/src/block_import.rs

Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>
This commit is contained in:
Arkadiy Paronyan
2019-11-05 12:17:12 +01:00
committed by Gavin Wood
parent 279391f9c1
commit 172359adad
11 changed files with 178 additions and 80 deletions
+6
View File
@@ -98,6 +98,12 @@ impl<Block, Executor, G: GenesisInit> TestClientBuilder<
pub fn backend(&self) -> Arc<Backend<Block>> {
self.backend.clone()
}
/// Create new `TestClientBuilder` with default backend and pruning window size
pub fn with_pruning_window(keep_blocks: u32) -> Self {
let backend = Arc::new(Backend::new_test(keep_blocks, 0));
Self::with_backend(backend)
}
}
impl<Executor, Backend, G: GenesisInit> TestClientBuilder<Executor, Backend, G> {