Calculate post-constructors state root in spec at load time (#5523)
* apply contract constructors at spec load time * debugging * do trie updates in two stages * add lint exception to newly-dead constructor * squash warning in RPC tests * kill dead accountdb constructors * restore accountdb constructors under test configuration * use provided state root in spec, if it exists
This commit is contained in:
committed by
Gav Wood
parent
5fd5c9e85c
commit
60bb0de9d6
@@ -83,7 +83,7 @@ fn make_spec(chain: &BlockChain) -> Spec {
|
||||
let genesis = Genesis::from(chain.genesis());
|
||||
let mut spec = ethereum::new_frontier_test();
|
||||
let state = chain.pre_state.clone().into();
|
||||
spec.set_genesis_state(state);
|
||||
spec.set_genesis_state(state).expect("unable to set genesis state");
|
||||
spec.overwrite_genesis_params(genesis);
|
||||
assert!(spec.is_state_root_valid());
|
||||
spec
|
||||
|
||||
Reference in New Issue
Block a user