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

fix gtest runtime type name

parent 5fa435a3
No related branches found
No related tags found
No related merge requests found
Pipeline #31976 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