Add support for --chain tobalaba (#8870)

* Add support for --chain tobalaba
This commit is contained in:
Maciej Hirsz 2018-06-14 11:03:22 +02:00 committed by 5chdn
parent 2f1019fda4
commit 20905094ce
No known key found for this signature in database
GPG Key ID: 1A40871B597F5F80
4 changed files with 64 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -61,6 +61,11 @@ pub fn new_expanse<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/expanse.json")) load(params.into(), include_bytes!("../../res/ethereum/expanse.json"))
} }
/// Create a new Tobalaba chain spec.
pub fn new_tobalaba<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/tobalaba.json"))
}
/// Create a new Musicoin mainnet chain spec. /// Create a new Musicoin mainnet chain spec.
pub fn new_musicoin<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec { pub fn new_musicoin<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/musicoin.json")) load(params.into(), include_bytes!("../../res/ethereum/musicoin.json"))

View File

@ -277,7 +277,7 @@ usage! {
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(), ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
"--chain=[CHAIN]", "--chain=[CHAIN]",
"Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, musicoin, ellaism, testnet, kovan or dev.", "Specify the blockchain type. CHAIN may be either a JSON chain specification file or olympic, frontier, homestead, mainnet, morden, ropsten, classic, expanse, tobalaba, musicoin, ellaism, testnet, kovan or dev.",
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(), ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(),
"--keys-path=[PATH]", "--keys-path=[PATH]",

View File

@ -32,6 +32,7 @@ pub enum SpecType {
Foundation, Foundation,
Morden, Morden,
Ropsten, Ropsten,
Tobalaba,
Kovan, Kovan,
Olympic, Olympic,
Classic, Classic,
@ -58,6 +59,7 @@ impl str::FromStr for SpecType {
"morden" | "classic-testnet" => SpecType::Morden, "morden" | "classic-testnet" => SpecType::Morden,
"ropsten" => SpecType::Ropsten, "ropsten" => SpecType::Ropsten,
"kovan" | "testnet" => SpecType::Kovan, "kovan" | "testnet" => SpecType::Kovan,
"tobalaba" => SpecType::Tobalaba,
"olympic" => SpecType::Olympic, "olympic" => SpecType::Olympic,
"expanse" => SpecType::Expanse, "expanse" => SpecType::Expanse,
"musicoin" => SpecType::Musicoin, "musicoin" => SpecType::Musicoin,
@ -81,6 +83,7 @@ impl fmt::Display for SpecType {
SpecType::Musicoin => "musicoin", SpecType::Musicoin => "musicoin",
SpecType::Ellaism => "ellaism", SpecType::Ellaism => "ellaism",
SpecType::Kovan => "kovan", SpecType::Kovan => "kovan",
SpecType::Tobalaba => "tobalaba",
SpecType::Dev => "dev", SpecType::Dev => "dev",
SpecType::Custom(ref custom) => custom, SpecType::Custom(ref custom) => custom,
}) })
@ -99,6 +102,7 @@ impl SpecType {
SpecType::Expanse => Ok(ethereum::new_expanse(params)), SpecType::Expanse => Ok(ethereum::new_expanse(params)),
SpecType::Musicoin => Ok(ethereum::new_musicoin(params)), SpecType::Musicoin => Ok(ethereum::new_musicoin(params)),
SpecType::Ellaism => Ok(ethereum::new_ellaism(params)), SpecType::Ellaism => Ok(ethereum::new_ellaism(params)),
SpecType::Tobalaba => Ok(ethereum::new_tobalaba(params)),
SpecType::Kovan => Ok(ethereum::new_kovan(params)), SpecType::Kovan => Ok(ethereum::new_kovan(params)),
SpecType::Dev => Ok(Spec::new_instant()), SpecType::Dev => Ok(Spec::new_instant()),
SpecType::Custom(ref filename) => { SpecType::Custom(ref filename) => {