Skip to content
Snippets Groups Projects
Commit efa80a30 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

fix gtest runtime type name

parent d1e78cc6
No related branches found
No related tags found
1 merge request!171prepare gtest runtime
Pipeline #31978 passed
This commit is part of merge request !171. Comments created here will be created in the context of that merge request.
{ {
"name": dev", "name": Test",
"id": "gdev", "id": "gtest",
"chainType": "Live", "chainType": "Live",
"bootNodes": [ "bootNodes": [
"/dns/gdev.p2p.legal/tcp/30334/p2p/12D3KooW9v5WsP38qU1kmafvA4CDw2vzYnFoWtdUqwonZtJK597r", "/dns/gdev.p2p.legal/tcp/30334/p2p/12D3KooW9v5WsP38qU1kmafvA4CDw2vzYnFoWtdUqwonZtJK597r",
...@@ -15,6 +15,6 @@ ...@@ -15,6 +15,6 @@
], ],
"properties": { "properties": {
"tokenDecimals": 2, "tokenDecimals": 2,
"tokenSymbol": D" "tokenSymbol": T"
} }
} }
\ No newline at end of file
...@@ -191,8 +191,6 @@ impl SubstrateCli for Cli { ...@@ -191,8 +191,6 @@ impl SubstrateCli for Cli {
let runtime_type = if starts_with("g1") { let runtime_type = if starts_with("g1") {
RuntimeType::G1 RuntimeType::G1
} else if starts_with("gdem") {
RuntimeType::GTest
} else if starts_with("dev") || starts_with("gdev") { } else if starts_with("dev") || starts_with("gdev") {
RuntimeType::GDev RuntimeType::GDev
} else if starts_with("gt") { } else if starts_with("gt") {
...@@ -226,7 +224,7 @@ impl SubstrateCli for Cli { ...@@ -226,7 +224,7 @@ impl SubstrateCli for Cli {
RuntimeType::GTest => &gtest_runtime::VERSION, RuntimeType::GTest => &gtest_runtime::VERSION,
#[cfg(feature = "gdev")] #[cfg(feature = "gdev")]
RuntimeType::GDev => &gdev_runtime::VERSION, RuntimeType::GDev => &gdev_runtime::VERSION,
_ => panic!("unknown runtime"), _ => panic!("unknown runtime {:?}", spec.runtime_type()),
} }
} }
} }
......
...@@ -98,6 +98,7 @@ impl sc_executor::NativeExecutionDispatch for G1Executor { ...@@ -98,6 +98,7 @@ impl sc_executor::NativeExecutionDispatch for G1Executor {
} }
} }
#[derive(Debug)]
pub enum RuntimeType { pub enum RuntimeType {
G1, G1,
GDev, GDev,
...@@ -115,11 +116,9 @@ impl IdentifyRuntimeType for Box<dyn sc_chain_spec::ChainSpec> { ...@@ -115,11 +116,9 @@ impl IdentifyRuntimeType for Box<dyn sc_chain_spec::ChainSpec> {
fn runtime_type(&self) -> RuntimeType { fn runtime_type(&self) -> RuntimeType {
if self.id().starts_with("g1") { if self.id().starts_with("g1") {
RuntimeType::G1 RuntimeType::G1
} else if self.id().starts_with("gdem") {
RuntimeType::GTest
} else if self.id().starts_with("dev") || self.id().starts_with("gdev") { } else if self.id().starts_with("dev") || self.id().starts_with("gdev") {
RuntimeType::GDev RuntimeType::GDev
} else if self.id().starts_with("gt") { } else if self.id().starts_with("gtest") {
RuntimeType::GTest RuntimeType::GTest
} else { } else {
panic!("unknown runtime") panic!("unknown runtime")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment