@@ -73,8 +73,8 @@ fn load_spec(
7373 "bifrost-genesis" => Box :: new ( service:: chain_spec:: bifrost:: chainspec_config ( para_id) ) ,
7474 #[ cfg( feature = "with-bifrost-runtime" ) ]
7575 "bifrost-local" => Box :: new ( service:: chain_spec:: bifrost:: local_testnet_config ( para_id) ?) ,
76- #[ cfg( feature = "with-dev -runtime" ) ]
77- "dev" => Box :: new ( service:: chain_spec:: dev :: development_config ( para_id) ?) ,
76+ #[ cfg( feature = "with-asgard -runtime" ) ]
77+ "dev" => Box :: new ( service:: chain_spec:: asgard :: development_config ( para_id) ?) ,
7878 path => {
7979 let path = std:: path:: PathBuf :: from ( path) ;
8080 if path. to_str ( ) . map ( |s| s. contains ( "asgard" ) ) == Some ( true ) {
@@ -91,13 +91,6 @@ fn load_spec(
9191 }
9292 #[ cfg( not( feature = "with-bifrost-runtime" ) ) ]
9393 return Err ( service:: BIFROST_RUNTIME_NOT_AVAILABLE . into ( ) ) ;
94- } else if path. to_str ( ) . map ( |s| s. contains ( "asgard-dev" ) ) == Some ( true ) {
95- #[ cfg( feature = "with-dev-runtime" ) ]
96- {
97- Box :: new ( service:: chain_spec:: dev:: ChainSpec :: from_json_file ( path) ?)
98- }
99- #[ cfg( not( feature = "with-dev-runtime" ) ) ]
100- return Err ( service:: DEV_RUNTIME_NOT_AVAILABLE . into ( ) ) ;
10194 } else {
10295 return Err ( "Unknown runtime is not available." . into ( ) ) ;
10396 }
@@ -141,7 +134,7 @@ impl SubstrateCli for Cli {
141134 }
142135
143136 fn native_runtime_version ( spec : & Box < dyn ChainSpec > ) -> & ' static RuntimeVersion {
144- if spec. is_asgard ( ) {
137+ if spec. is_asgard ( ) || spec . is_dev ( ) {
145138 #[ cfg( feature = "with-asgard-runtime" ) ]
146139 {
147140 & service:: collator:: asgard_runtime:: VERSION
@@ -156,12 +149,7 @@ impl SubstrateCli for Cli {
156149 #[ cfg( not( feature = "with-bifrost-runtime" ) ) ]
157150 panic ! ( "{}" , service:: BIFROST_RUNTIME_NOT_AVAILABLE ) ;
158151 } else {
159- #[ cfg( feature = "with-dev-runtime" ) ]
160- {
161- & service:: dev:: dev_runtime:: VERSION
162- }
163- #[ cfg( not( feature = "with-dev-runtime" ) ) ]
164- panic ! ( "{}" , service:: DEV_RUNTIME_NOT_AVAILABLE ) ;
152+ panic ! ( "{}" , "unknown runtime!" ) ;
165153 }
166154 }
167155}
@@ -240,14 +228,6 @@ macro_rules! construct_async_run {
240228 let task_manager = $components. task_manager;
241229 { $( $code ) * } . map( |v| ( v, task_manager) )
242230 } ) ;
243- #[ cfg( feature = "with-dev-runtime" ) ]
244- return runner. async_run( |$config| {
245- let $components = crate :: service:: dev:: new_partial(
246- & $config,
247- ) ?;
248- let task_manager = $components. task_manager;
249- { $( $code ) * } . map( |v| ( v, task_manager) )
250- } ) ;
251231 } }
252232}
253233
@@ -265,7 +245,7 @@ macro_rules! with_runtime_or_err {
265245
266246 #[ cfg( not( feature = "with-bifrost-runtime" ) ) ]
267247 return Err ( service:: BIFROST_RUNTIME_NOT_AVAILABLE . into( ) ) ;
268- } else if $chain_spec. is_asgard( ) {
248+ } else if $chain_spec. is_asgard( ) || $chain_spec . is_dev ( ) {
269249 #[ cfg( feature = "with-asgard-runtime" ) ]
270250 #[ allow( unused_imports) ]
271251 use asgard_runtime:: { Block , RuntimeApi } ;
@@ -277,8 +257,9 @@ macro_rules! with_runtime_or_err {
277257
278258 #[ cfg( not( feature = "with-asgard-runtime" ) ) ]
279259 return Err ( service:: ASGARD_RUNTIME_NOT_AVAILABLE . into( ) ) ;
280- } else {
281- return Err ( service:: DEV_RUNTIME_NOT_AVAILABLE . into( ) ) ;
260+ }
261+ else {
262+ return Err ( service:: UNKNOWN_RUNTIME . into( ) ) ;
282263 }
283264 }
284265}
@@ -304,8 +285,8 @@ pub fn run() -> Result<()> {
304285 None => {
305286 let runner = cli. create_runner ( & cli. run . normalize ( ) ) ?;
306287 runner. run_node_until_exit ( |config| async move {
307- if config. chain_spec . is_asgard_dev ( ) {
308- #[ cfg( feature = "with-dev -runtime" ) ]
288+ if config. chain_spec . is_dev ( ) {
289+ #[ cfg( feature = "with-asgard -runtime" ) ]
309290 {
310291 return service:: dev:: new_full ( config) . map_err ( Into :: into) ;
311292 }
0 commit comments