@@ -10,9 +10,6 @@ use sc_cli::SubstrateCli;
1010use sc_service:: PartialComponents ;
1111use sp_keyring:: Sr25519Keyring ;
1212
13- #[ cfg( feature = "try-runtime" ) ]
14- use try_runtime_cli:: block_building_info:: timestamp_with_aura_info;
15-
1613impl SubstrateCli for Cli {
1714 fn impl_name ( ) -> String {
1815 "Substrate Node" . into ( )
@@ -172,28 +169,7 @@ pub fn run() -> sc_cli::Result<()> {
172169 } )
173170 } ,
174171 #[ cfg( feature = "try-runtime" ) ]
175- Some ( Subcommand :: TryRuntime ( cmd) ) => {
176- use crate :: service:: ExecutorDispatch ;
177- use sc_executor:: { sp_wasm_interface:: ExtendedHostFunctions , NativeExecutionDispatch } ;
178- let runner = cli. create_runner ( cmd) ?;
179- runner. async_run ( |config| {
180- // we don't need any of the components of new_partial, just a runtime, or a task
181- // manager to do `async_run`.
182- let registry = config. prometheus_config . as_ref ( ) . map ( |cfg| & cfg. registry ) ;
183- let task_manager =
184- sc_service:: TaskManager :: new ( config. tokio_handle . clone ( ) , registry)
185- . map_err ( |e| sc_cli:: Error :: Service ( sc_service:: Error :: Prometheus ( e) ) ) ?;
186- let info_provider = timestamp_with_aura_info ( 6000 ) ;
187-
188- Ok ( (
189- cmd. run :: < Block , ExtendedHostFunctions <
190- sp_io:: SubstrateHostFunctions ,
191- <ExecutorDispatch as NativeExecutionDispatch >:: ExtendHostFunctions ,
192- > , _ > ( Some ( info_provider) ) ,
193- task_manager,
194- ) )
195- } )
196- } ,
172+ Some ( Subcommand :: TryRuntime ) => Err ( try_runtime_cli:: DEPRECATION_NOTICE . into ( ) ) ,
197173 #[ cfg( not( feature = "try-runtime" ) ) ]
198174 Some ( Subcommand :: TryRuntime ) => Err ( "TryRuntime wasn't enabled when building the node. \
199175 You can enable it with `--features try-runtime`."
0 commit comments