diff --git a/core/src/commands/execute_block.rs b/core/src/commands/execute_block.rs index 1c918424b9..e63724d75b 100644 --- a/core/src/commands/execute_block.rs +++ b/core/src/commands/execute_block.rs @@ -58,7 +58,7 @@ pub struct Command { /// If `state` is `Live`, this can be ignored and the same uri is used for both. #[arg( long, - value_parser = crate::parse::url + value_parser = crate::common::parse::url )] pub block_ws_uri: Option, diff --git a/core/src/commands/follow_chain.rs b/core/src/commands/follow_chain.rs index 1381d67c9c..d6707af98b 100644 --- a/core/src/commands/follow_chain.rs +++ b/core/src/commands/follow_chain.rs @@ -28,7 +28,9 @@ use sp_runtime::{ use substrate_rpc_client::{ws_client, ChainApi, FinalizedHeaders, Subscription, WsClient}; use crate::{ - build_executor, full_extensions, parse, rpc_err_handler, + build_executor, + common::parse, + full_extensions, rpc_err_handler, state::{LiveState, RuntimeChecks, State}, state_machine_call_with_proof, SharedParams, LOG_TARGET, }; diff --git a/core/src/commands/offchain_worker.rs b/core/src/commands/offchain_worker.rs index 5b0ab78a57..f5d8246603 100644 --- a/core/src/commands/offchain_worker.rs +++ b/core/src/commands/offchain_worker.rs @@ -23,7 +23,9 @@ use sp_runtime::traits::{Block as BlockT, NumberFor}; use substrate_rpc_client::{ws_client, ChainApi}; use crate::{ - build_executor, full_extensions, parse, rpc_err_handler, + build_executor, + common::parse, + full_extensions, rpc_err_handler, state::{LiveState, RuntimeChecks, State}, state_machine_call, SharedParams, LOG_TARGET, }; diff --git a/core/src/common/mod.rs b/core/src/common/mod.rs index 52aecd378c..296231dff4 100644 --- a/core/src/common/mod.rs +++ b/core/src/common/mod.rs @@ -1,2 +1,3 @@ pub mod misc_logging; +pub mod parse; pub mod shared_parameters; diff --git a/core/src/parse.rs b/core/src/common/parse.rs similarity index 100% rename from core/src/parse.rs rename to core/src/common/parse.rs diff --git a/core/src/common/shared_parameters.rs b/core/src/common/shared_parameters.rs index 968d3b255b..0b4f3020c7 100644 --- a/core/src/common/shared_parameters.rs +++ b/core/src/common/shared_parameters.rs @@ -23,7 +23,7 @@ use sc_cli::{ }; use sp_runtime::StateVersion; -use crate::parse; +use crate::common::parse; /// Shared parameters of the `try-runtime` commands #[derive(Debug, Clone, clap::Parser)] diff --git a/core/src/lib.rs b/core/src/lib.rs index 2199351041..f3a6daa198 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -42,7 +42,6 @@ use sp_weights::Weight; pub mod commands; pub mod common; mod inherents; -mod parse; pub mod state; pub(crate) const LOG_TARGET: &str = "try-runtime::cli"; diff --git a/core/src/state.rs b/core/src/state.rs index adce445065..a5f97547e5 100644 --- a/core/src/state.rs +++ b/core/src/state.rs @@ -33,8 +33,11 @@ use sp_runtime::{ use substrate_rpc_client::{ws_client, ChainApi}; use crate::{ - common::shared_parameters::{Runtime, SharedParams}, - ensure_try_runtime, hash_of, parse, rpc_err_handler, LOG_TARGET, + common::{ + parse, + shared_parameters::{Runtime, SharedParams}, + }, + ensure_try_runtime, hash_of, rpc_err_handler, LOG_TARGET, }; /// A `Live` variant for [`State`]