revert moves to Spec

This commit is contained in:
keorn
2016-11-14 10:04:34 +00:00
parent 15d748c2f7
commit 2d4b4cf5c9
11 changed files with 88 additions and 78 deletions

View File

@@ -19,6 +19,7 @@ use std::time::Duration;
use util::{Address, U256, version_data};
use util::journaldb::Algorithm;
use ethcore::spec::Spec;
use ethcore::ethereum;
use ethcore::client::Mode;
use ethcore::miner::{GasPricer, GasPriceCalibratorOptions};
use user_defaults::UserDefaults;
@@ -60,11 +61,11 @@ impl str::FromStr for SpecType {
impl SpecType {
pub fn spec(&self) -> Result<Spec, String> {
match *self {
SpecType::Mainnet => Ok(Spec::new_ethereum_frontier()),
SpecType::Testnet => Ok(Spec::new_ethereum_morden()),
SpecType::Olympic => Ok(Spec::new_ethereum_olympic()),
SpecType::Classic => Ok(Spec::new_ethereum_classic()),
SpecType::Expanse => Ok(Spec::new_expanse()),
SpecType::Mainnet => Ok(ethereum::new_frontier()),
SpecType::Testnet => Ok(ethereum::new_morden()),
SpecType::Olympic => Ok(ethereum::new_olympic()),
SpecType::Classic => Ok(ethereum::new_classic()),
SpecType::Expanse => Ok(ethereum::new_expanse()),
SpecType::Dev => Ok(Spec::new_instant()),
SpecType::Custom(ref filename) => {
let file = try!(fs::File::open(filename).map_err(|_| "Could not load specification file."));