From 4346050754a8ff00428bb947fbbf05fe4127db27 Mon Sep 17 00:00:00 2001
From: librelois <c@elo.tf>
Date: Fri, 14 Jan 2022 18:17:11 +0100
Subject: [PATCH] spec: handle currency name gdem

---
 node/src/command.rs      | 2 +-
 node/src/service.rs      | 2 +-
 runtime/gtest/src/lib.rs | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/node/src/command.rs b/node/src/command.rs
index 294886555..435f883c1 100644
--- a/node/src/command.rs
+++ b/node/src/command.rs
@@ -66,7 +66,7 @@ impl SubstrateCli for Cli {
 
                 if starts_with("g1") {
                     Box::new(chain_spec::g1::ChainSpec::from_json_file(path)?)
-                } else if starts_with("gtest") {
+                } else if starts_with("gdem") || starts_with("gtest") {
                     Box::new(chain_spec::gtest::ChainSpec::from_json_file(path)?)
                 } else if starts_with("gdev") {
                     Box::new(chain_spec::gdev::ChainSpec::from_json_file(path)?)
diff --git a/node/src/service.rs b/node/src/service.rs
index e4833286d..a95eabe90 100644
--- a/node/src/service.rs
+++ b/node/src/service.rs
@@ -114,7 +114,7 @@ impl IdentifyVariant for Box<dyn sc_chain_spec::ChainSpec> {
     }
 
     fn is_test(&self) -> bool {
-        self.id().starts_with("gtest")
+        self.id().starts_with("gdem") || self.id().starts_with("gtest")
     }
 
     fn is_dev(&self) -> bool {
diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs
index a2c7ff87d..b7b390040 100644
--- a/runtime/gtest/src/lib.rs
+++ b/runtime/gtest/src/lib.rs
@@ -94,8 +94,8 @@ pub mod opaque {
 //   https://substrate.dev/docs/en/knowledgebase/runtime/upgrades#runtime-versioning
 #[sp_version::runtime_version]
 pub const VERSION: RuntimeVersion = RuntimeVersion {
-    spec_name: create_runtime_str!("gtest"),
-    impl_name: create_runtime_str!("gtest"),
+    spec_name: create_runtime_str!("gdem"),
+    impl_name: create_runtime_str!("gdem"),
     authoring_version: 1,
     // The version of the runtime specification. A full node will not attempt to use its native
     //   runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
-- 
GitLab