unify loading spec && further spec cleanups (#10948)
* bundle_* macros for spec * fixed failing tests * renamed bundle.rs to chain.rs * removed unused derives * updated spec/chain.rs description
This commit is contained in:
@@ -61,7 +61,7 @@ macro_rules! difficulty_json_test {
|
||||
|
||||
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> {
|
||||
let tempdir = TempDir::new("").unwrap();
|
||||
json_difficulty_test(json_data, ::ethereum::$spec(&tempdir.path()), h)
|
||||
json_difficulty_test(json_data, crate::spec::$spec(&tempdir.path()), h)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,7 +74,7 @@ macro_rules! difficulty_json_test_nopath {
|
||||
use json_tests::HookType;
|
||||
|
||||
fn do_json_test<H: FnMut(&str, HookType)>(json_data: &[u8], h: &mut H) -> Vec<String> {
|
||||
json_difficulty_test(json_data, ::ethereum::$spec(), h)
|
||||
json_difficulty_test(json_data, crate::spec::$spec(), h)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ use rlp::RlpStream;
|
||||
use hash::keccak;
|
||||
use machine::Machine;
|
||||
use ethereum_types::BigEndianHash;
|
||||
use crate::spec;
|
||||
|
||||
use super::HookType;
|
||||
|
||||
@@ -271,7 +272,7 @@ fn do_json_test_for<H: FnMut(&str, HookType)>(vm_type: &VMType, json_data: &[u8]
|
||||
state.populate_from(From::from(vm.pre_state.clone()));
|
||||
let info: EnvInfo = From::from(vm.env);
|
||||
let machine = {
|
||||
let mut machine = ::ethereum::new_frontier_test_machine();
|
||||
let mut machine = spec::new_frontier_test_machine();
|
||||
machine.set_schedule_creation_rules(Box::new(move |s, _| s.max_depth = 1));
|
||||
machine
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user