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 ParonyanandMarcio Diaz authored and Gavin Wood committed 2019-11-05 12:17:12 +01:00
1 parent 279391f9c1
commit 172359adad
11 files changed
+178 -80

No files matched your search

+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> {