update json_tests

This commit is contained in:
keorn 2016-11-11 18:57:57 +00:00
parent cc39b24599
commit ea9c479fff
2 changed files with 12 additions and 12 deletions

View File

@ -17,7 +17,7 @@
use super::test_common::*; use super::test_common::*;
use client::{BlockChainClient, Client, ClientConfig}; use client::{BlockChainClient, Client, ClientConfig};
use block::Block; use block::Block;
use ethereum; use spec::Spec;
use tests::helpers::*; use tests::helpers::*;
use devtools::*; use devtools::*;
use spec::Genesis; use spec::Genesis;
@ -46,11 +46,11 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
let genesis = Genesis::from(blockchain.genesis()); let genesis = Genesis::from(blockchain.genesis());
let state = From::from(blockchain.pre_state.clone()); let state = From::from(blockchain.pre_state.clone());
let mut spec = match era { let mut spec = match era {
ChainEra::Frontier => ethereum::new_frontier_test(), ChainEra::Frontier => Spec::new_ethereum_frontier_test(),
ChainEra::Homestead => ethereum::new_homestead_test(), ChainEra::Homestead => Spec::new_ethereum_homestead_test(),
ChainEra::Eip150 => ethereum::new_eip150_test(), ChainEra::Eip150 => Spec::new_ethereum_eip150_test(),
ChainEra::Eip161 => ethereum::new_eip161_test(), ChainEra::Eip161 => Spec::new_ethereum_eip161_test(),
ChainEra::TransitionTest => ethereum::new_transition_test(), ChainEra::TransitionTest => Spec::new_ethereum_transition_test(),
}; };
spec.set_genesis_state(state); spec.set_genesis_state(state);
spec.overwrite_genesis_params(genesis); spec.overwrite_genesis_params(genesis);

View File

@ -18,7 +18,7 @@ use super::test_common::*;
use tests::helpers::*; use tests::helpers::*;
use pod_state::{self, PodState}; use pod_state::{self, PodState};
use log_entry::LogEntry; use log_entry::LogEntry;
use ethereum; use spec::Spec;
use ethjson; use ethjson;
pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> { pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
@ -26,11 +26,11 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
let tests = ethjson::state::Test::load(json_data).unwrap(); let tests = ethjson::state::Test::load(json_data).unwrap();
let mut failed = Vec::new(); let mut failed = Vec::new();
let engine = match era { let engine = match era {
ChainEra::Frontier => ethereum::new_mainnet_like().engine, ChainEra::Frontier => Spec::new_ethereum_mainnet_like().engine,
ChainEra::Homestead => ethereum::new_homestead_test().engine, ChainEra::Homestead => Spec::new_ethereum_homestead_test().engine,
ChainEra::Eip150 => ethereum::new_eip150_test().engine, ChainEra::Eip150 => Spec::new_ethereum_eip150_test().engine,
ChainEra::Eip161 => ethereum::new_eip161_test().engine, ChainEra::Eip161 => Spec::new_ethereum_eip161_test().engine,
ChainEra::TransitionTest => ethereum::new_transition_test().engine, ChainEra::TransitionTest => Spec::new_ethereum_transition_test().engine,
}; };
for (name, test) in tests.into_iter() { for (name, test) in tests.into_iter() {