From 53258cca6cbeca1ef0e78b8418674b53d8953a1a Mon Sep 17 00:00:00 2001 From: keorn Date: Fri, 11 Nov 2016 17:27:20 +0000 Subject: [PATCH] add new dev spec --- ethcore/src/miner/miner.rs | 2 +- ethcore/src/spec/spec.rs | 2 +- parity/params.rs | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ethcore/src/miner/miner.rs b/ethcore/src/miner/miner.rs index 19a2b9a10..af4677cf3 100644 --- a/ethcore/src/miner/miner.rs +++ b/ethcore/src/miner/miner.rs @@ -1251,7 +1251,7 @@ mod tests { #[test] fn internal_seals_without_work() { - let miner = Miner::with_spec(&Spec::new_test_instant()); + let miner = Miner::with_spec(&Spec::new_instant()); let c = generate_dummy_client(2); let client = c.reference().as_ref(); diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 786b264ab..d8b2f72fc 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -279,7 +279,7 @@ impl Spec { pub fn new_null() -> Spec { load_bundled!("null") } /// Create a new Spec with InstantSeal consensus which does internal sealing (not requiring work). - pub fn new_test_instant() -> Spec { load_bundled!("instant_seal") } + pub fn new_instant() -> Spec { load_bundled!("instant_seal") } /// Create a new Olympic chain spec. pub fn new_ethereum_olympic() -> Spec { load_bundled!("ethereum/olympic") } diff --git a/parity/params.rs b/parity/params.rs index 783c4564a..0a24cc7dd 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -30,6 +30,7 @@ pub enum SpecType { Olympic, Classic, Expanse, + Dev, Custom(String), } @@ -49,6 +50,7 @@ impl str::FromStr for SpecType { "morden" | "testnet" => SpecType::Testnet, "olympic" => SpecType::Olympic, "expanse" => SpecType::Expanse, + "dev" => SpecType::Dev, other => SpecType::Custom(other.into()), }; Ok(spec) @@ -63,6 +65,7 @@ impl SpecType { SpecType::Olympic => Ok(Spec::new_ethereum_olympic()), SpecType::Classic => Ok(Spec::new_ethereum_classic()), SpecType::Expanse => Ok(Spec::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.")); Spec::load(file)