Skip to content

Commit

Permalink
move parse to common
Browse files Browse the repository at this point in the history
  • Loading branch information
liamaharon committed May 10, 2024
1 parent 4424f61 commit a0a5485
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/src/commands/execute_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>,

Expand Down
4 changes: 3 additions & 1 deletion core/src/commands/follow_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
4 changes: 3 additions & 1 deletion core/src/commands/offchain_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions core/src/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod misc_logging;
pub mod parse;
pub mod shared_parameters;
File renamed without changes.
2 changes: 1 addition & 1 deletion core/src/common/shared_parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 0 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
7 changes: 5 additions & 2 deletions core/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`]
Expand Down

0 comments on commit a0a5485

Please sign in to comment.