Optionally clone block behind work-package.

This commit is contained in:
Gav Wood
2016-06-30 12:56:58 +02:00
parent 5665083e20
commit 9c07e5c355
6 changed files with 48 additions and 3 deletions

View File

@@ -362,6 +362,9 @@ impl Client {
let receipts = block.receipts().clone();
let traces = From::from(block.traces().clone().unwrap_or_else(Vec::new));
// CHECK! I *think* this is fine, even if the state_root is equal to another
// already-imported block of the same number.
// TODO: Prove it with a test.
block.drain().commit(number, hash, ancient).expect("State DB commit failed.");
// And update the chain after commit to prevent race conditions