finish implementing basic block chunking

This commit is contained in:
Robert Habermeier
2016-06-10 12:45:46 +02:00
parent 5e0ba1c310
commit 997fd93016
3 changed files with 27 additions and 11 deletions

View File

@@ -755,13 +755,16 @@ impl<V> BlockChainClient for Client<V> where V: Verifier {
}
fn take_snapshot(&self) {
let best_header = HeaderView::(&self.best_block_header());
let best_header_bytes = self.best_block_header();
let best_header = HeaderView::new(&best_header_bytes);
let hash = best_header.hash();
let state_root = best_header.state_root();
// lock the state db to keep it consistent with the best block.
// clone the arc so we can loan out self to the block chunker.
let state_db = self.state_db.clone().lock().unwrap();
// lock the state db while we create the state chunks.
{
let state_db = self.state_db.lock().unwrap();
// todo [rob] actually create the state chunks.
}
}
}

View File

@@ -501,4 +501,8 @@ impl BlockChainClient for TestBlockChainClient {
fn all_transactions(&self) -> Vec<SignedTransaction> {
self.miner.all_transactions()
}
fn take_snapshot(&self) {
unimplemented!()
}
}