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 GitHub
parent 9e872788c7
commit 4fe6c148ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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"))
}
/// 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.
pub fn new_musicoin<'a, T: Into<SpecParams<'a>>>(params: T) -> Spec {
load(params.into(), include_bytes!("../../res/ethereum/musicoin.json"))

View File

@ -286,7 +286,7 @@ usage! {
ARG arg_chain: (String) = "foundation", or |c: &Config| c.parity.as_ref()?.chain.clone(),
"--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, easthub, social, 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, easthub, social, testnet, kovan or dev.",
ARG arg_keys_path: (String) = "$BASE/keys", or |c: &Config| c.parity.as_ref()?.keys_path.clone(),
"--keys-path=[PATH]",

View File

@ -33,6 +33,7 @@ pub enum SpecType {
Foundation,
Morden,
Ropsten,
Tobalaba,
Kovan,
Olympic,
Classic,
@ -61,6 +62,7 @@ impl str::FromStr for SpecType {
"morden" | "classic-testnet" => SpecType::Morden,
"ropsten" => SpecType::Ropsten,
"kovan" | "testnet" => SpecType::Kovan,
"tobalaba" => SpecType::Tobalaba,
"olympic" => SpecType::Olympic,
"expanse" => SpecType::Expanse,
"musicoin" => SpecType::Musicoin,
@ -88,6 +90,7 @@ impl fmt::Display for SpecType {
SpecType::Easthub => "easthub",
SpecType::Social => "social",
SpecType::Kovan => "kovan",
SpecType::Tobalaba => "tobalaba",
SpecType::Dev => "dev",
SpecType::Custom(ref custom) => custom,
})
@ -108,6 +111,7 @@ impl SpecType {
SpecType::Ellaism => Ok(ethereum::new_ellaism(params)),
SpecType::Easthub => Ok(ethereum::new_easthub(params)),
SpecType::Social => Ok(ethereum::new_social(params)),
SpecType::Tobalaba => Ok(ethereum::new_tobalaba(params)),
SpecType::Kovan => Ok(ethereum::new_kovan(params)),
SpecType::Dev => Ok(Spec::new_instant()),
SpecType::Custom(ref filename) => {