From 29e8b2a3b828a1e27e339c338ae78901c122805a Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Fri, 30 Dec 2016 15:52:49 +0100 Subject: [PATCH] parse testnet chain as ropsten --- parity/params.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/parity/params.rs b/parity/params.rs index bc1950165..9399b33e4 100644 --- a/parity/params.rs +++ b/parity/params.rs @@ -27,7 +27,7 @@ use user_defaults::UserDefaults; #[derive(Debug, PartialEq)] pub enum SpecType { Mainnet, - Testnet, + Morden, Ropsten, Olympic, Classic, @@ -49,8 +49,8 @@ impl str::FromStr for SpecType { let spec = match s { "frontier" | "homestead" | "mainnet" => SpecType::Mainnet, "frontier-dogmatic" | "homestead-dogmatic" | "classic" => SpecType::Classic, - "morden" | "testnet" | "classic-testnet" => SpecType::Testnet, - "ropsten" => SpecType::Ropsten, + "morden" | "classic-testnet" => SpecType::Morden, + "ropsten" | "testnet" => SpecType::Ropsten, "olympic" => SpecType::Olympic, "expanse" => SpecType::Expanse, "dev" => SpecType::Dev, @@ -64,7 +64,7 @@ impl SpecType { pub fn spec(&self) -> Result { match *self { SpecType::Mainnet => Ok(ethereum::new_frontier()), - SpecType::Testnet => Ok(ethereum::new_morden()), + SpecType::Morden => Ok(ethereum::new_morden()), SpecType::Ropsten => Ok(ethereum::new_ropsten()), SpecType::Olympic => Ok(ethereum::new_olympic()), SpecType::Classic => Ok(ethereum::new_classic()), @@ -292,12 +292,12 @@ mod tests { assert_eq!(SpecType::Mainnet, "frontier".parse().unwrap()); assert_eq!(SpecType::Mainnet, "homestead".parse().unwrap()); assert_eq!(SpecType::Mainnet, "mainnet".parse().unwrap()); - assert_eq!(SpecType::Testnet, "testnet".parse().unwrap()); - assert_eq!(SpecType::Testnet, "morden".parse().unwrap()); + assert_eq!(SpecType::Ropsten, "testnet".parse().unwrap()); + assert_eq!(SpecType::Morden, "morden".parse().unwrap()); assert_eq!(SpecType::Ropsten, "ropsten".parse().unwrap()); assert_eq!(SpecType::Olympic, "olympic".parse().unwrap()); assert_eq!(SpecType::Classic, "classic".parse().unwrap()); - assert_eq!(SpecType::Testnet, "classic-testnet".parse().unwrap()); + assert_eq!(SpecType::Morden, "classic-testnet".parse().unwrap()); } #[test]