Skip to content

Commit

Permalink
update for turbulence (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc authored May 5, 2020
1 parent 28bd3c3 commit 41a7e53
Show file tree
Hide file tree
Showing 8 changed files with 460 additions and 157 deletions.
49 changes: 0 additions & 49 deletions resources/testnet-dist.json

This file was deleted.

96 changes: 0 additions & 96 deletions resources/testnet.json

This file was deleted.

133 changes: 133 additions & 0 deletions resources/turbulence-dist.json

Large diffs are not rendered by default.

315 changes: 315 additions & 0 deletions resources/turbulence.json

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions scripts/update-testnet.sh

This file was deleted.

7 changes: 7 additions & 0 deletions scripts/update-turbulence.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -e

cargo clean
WASM_BUILD_TYPE=release cargo run -- build-spec --chain turbulence-latest > ./resources/turbulence.json
WASM_BUILD_TYPE=release cargo run -- build-spec --chain ./resources/turbulence.json --raw > ./resources/turbulence-dist.json
6 changes: 3 additions & 3 deletions src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ pub fn local_testnet_config() -> ChainSpec {
)
}

pub fn laminar_testnet_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../resources/testnet-dist.json")[..])
pub fn laminar_turbulence_config() -> Result<ChainSpec, String> {
ChainSpec::from_json_bytes(&include_bytes!("../resources/turbulence-dist.json")[..])
}

pub fn laminar_testnet_latest_config() -> ChainSpec {
pub fn laminar_turbulence_latest_config() -> ChainSpec {
let mut properties = Map::new();
properties.insert("tokenSymbol".into(), "LAMI".into());
properties.insert("tokenDecimals".into(), 18.into());
Expand Down
4 changes: 2 additions & 2 deletions src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl SubstrateCli for Cli {
Ok(match id {
"dev" => Box::new(chain_spec::development_config()),
"local" => Box::new(chain_spec::local_testnet_config()),
"" | "testnet" => Box::new(chain_spec::laminar_testnet_config()?),
"testnet-latest" => Box::new(chain_spec::laminar_testnet_latest_config()),
"" | "turbulence" => Box::new(chain_spec::laminar_turbulence_config()?),
"turbulence-latest" => Box::new(chain_spec::laminar_turbulence_latest_config()),
path => Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?),
})
}
Expand Down

0 comments on commit 41a7e53

Please sign in to comment.