mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-05 21:27:24 +00:00
Runtime State Test + Integration with try-runtime (#10174)
* add missing version to dependencies * Huh * add features more * more fixing * last touches * it all finally works * remove some feature gates * remove unused * fix old macro * make it work again * fmt * remove unused import * ".git/.scripts/fmt.sh" 1 * Cleanup more * fix and rename everything * a few clippy fixes * Add try-runtime feature Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * small fixes * fmt * Update bin/node-template/runtime/src/lib.rs * fix build * Update utils/frame/try-runtime/cli/src/lib.rs Co-authored-by: David <dvdplm@gmail.com> * Update utils/frame/try-runtime/cli/src/commands/execute_block.rs Co-authored-by: David <dvdplm@gmail.com> * address all review comments * fix typos * revert spec change * last touches * update docs * fmt * remove some debug_assertions * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: David <dvdplm@gmail.com>
This commit is contained in:
@@ -23,7 +23,7 @@ use jsonrpsee::{
|
||||
core::client::{Subscription, SubscriptionClientT},
|
||||
ws_client::WsClientBuilder,
|
||||
};
|
||||
use parity_scale_codec::Decode;
|
||||
use parity_scale_codec::{Decode, Encode};
|
||||
use remote_externalities::{rpc_api, Builder, Mode, OnlineConfig};
|
||||
use sc_executor::NativeExecutionDispatch;
|
||||
use sc_service::Configuration;
|
||||
@@ -40,6 +40,22 @@ pub struct FollowChainCmd {
|
||||
/// The url to connect to.
|
||||
#[clap(short, long, parse(try_from_str = parse::url))]
|
||||
uri: String,
|
||||
|
||||
/// If set, then the state root check is enabled.
|
||||
#[clap(long)]
|
||||
state_root_check: bool,
|
||||
|
||||
/// Which try-state targets to execute when running this command.
|
||||
///
|
||||
/// Expected values:
|
||||
/// - `all`
|
||||
/// - `none`
|
||||
/// - A comma separated list of pallets, as per pallet names in `construct_runtime!()` (e.g.
|
||||
/// `Staking, System`).
|
||||
/// - `rr-[x]` where `[x]` is a number. Then, the given number of pallets are checked in a
|
||||
/// round-robin fashion.
|
||||
#[clap(long, default_value = "none")]
|
||||
try_state: frame_try_runtime::TryStateSelect,
|
||||
}
|
||||
|
||||
pub(crate) async fn follow_chain<Block, ExecDispatch>(
|
||||
@@ -141,8 +157,8 @@ where
|
||||
state_ext,
|
||||
&executor,
|
||||
execution,
|
||||
"TryRuntime_execute_block_no_check",
|
||||
block.encode().as_ref(),
|
||||
"TryRuntime_execute_block",
|
||||
(block, command.state_root_check, command.try_state.clone()).encode().as_ref(),
|
||||
full_extensions(),
|
||||
)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user