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