Skip to content

Commit

Permalink
update chain_spec.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
mohaijiang committed Oct 19, 2022
1 parent 808e0b5 commit c4870fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
27 changes: 3 additions & 24 deletions bin/node/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,10 +553,10 @@ fn hamster_testnet_config_genesis() -> GenesisConfig {

let endowed_accounts: Vec<AccountId> = vec![root_key.clone()];

newtouch_genesis(initial_authorities, vec![], root_key, Some(endowed_accounts))
hamster_genesis(initial_authorities, vec![], root_key, Some(endowed_accounts))
}

/// newtouch testnet config.
/// hamster testnet config.
pub fn hamster_testnet_config() -> ChainSpec {
let boot_nodes = vec![
];
Expand All @@ -578,29 +578,8 @@ pub fn hamster_testnet_config() -> ChainSpec {
}


/// newtouch testnet config.
pub fn newtouch_mainnet_config() -> ChainSpec {
let boot_nodes = vec![
];
ChainSpec::from_genesis(
"Newtouch MainNet",
"newtouch_mainnet",
ChainType::Live,
hamster_testnet_config_genesis,
boot_nodes,
Some(
TelemetryEndpoints::new(vec![(STAGING_TELEMETRY_URL.to_string(), 0)])
.expect("Staging telemetry url is valid; qed"),
),
None,
None,
None,
Default::default(),
)
}

/// Helper function to create GenesisConfig for testing
pub fn newtouch_genesis(
pub fn hamster_genesis(
initial_authorities: Vec<(
AccountId,
AccountId,
Expand Down
1 change: 0 additions & 1 deletion bin/node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ impl SubstrateCli for Cli {
"fir" | "flaming-fir" => Box::new(chain_spec::flaming_fir_config()?),
"staging" => Box::new(chain_spec::staging_testnet_config()),
"hamster_testnet" => Box::new(chain_spec::hamster_testnet_config()),
"newtouch_main" => Box::new(chain_spec::newtouch_mainnet_config()),
path =>
Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
};
Expand Down

0 comments on commit c4870fa

Please sign in to comment.