Take control of recovered snapshots, start restoration asynchronously (#2010)

* take control of given snapshot

* start snapshot restoration asynchronously,
This commit is contained in:
Robert Habermeier
2016-08-25 22:20:44 +02:00
committed by Arkadiy Paronyan
parent 2aef81cf90
commit 1c19a807d9
6 changed files with 181 additions and 85 deletions

View File

@@ -79,7 +79,6 @@ fn chunk_and_restore(amount: u64) {
}
rebuilder.glue_chunks();
drop(rebuilder);
// and test it.
let new_chain = BlockChain::new(Default::default(), &genesis, new_db);

View File

@@ -72,8 +72,9 @@ fn snap_and_restore() {
rebuilder.feed(&chunk).unwrap();
}
rebuilder.check_missing().unwrap();
assert_eq!(rebuilder.state_root(), state_root);
rebuilder.check_missing().unwrap();
new_db
};