diff --git a/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs b/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs index c8582ea4d2a60dbef62895af00aa6bd6847b1017..948ff9c030ea9f120d1fb68902381fa8df8cc413 100644 --- a/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs +++ b/substrate/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs @@ -40,8 +40,8 @@ pub struct OnRuntimeUpgradeCmd { /// Performing any checks will potentially invalidate the measured PoV/Weight. // NOTE: The clap attributes make it backwards compatible with the previous `--checks` flag. #[clap(long, - default_value = "None", - default_missing_value = "All", + default_value = "pre-and-post", + default_missing_value = "all", num_args = 0..=1, require_equals = true, verbatim_doc_comment)] diff --git a/substrate/utils/frame/try-runtime/cli/src/lib.rs b/substrate/utils/frame/try-runtime/cli/src/lib.rs index 0a521d121556225a9727798b89ea74d6c44fc877..bc9fd99d3e6289343632d64eaa58fc8a64e01846 100644 --- a/substrate/utils/frame/try-runtime/cli/src/lib.rs +++ b/substrate/utils/frame/try-runtime/cli/src/lib.rs @@ -134,10 +134,10 @@ //! //! ```ignore //! -//! #[cfg(feature = try-runtime)] +//! #[cfg(feature = "try-runtime")] //! fn pre_upgrade() -> Result<Vec<u8>, &'static str> {} //! -//! #[cfg(feature = try-runtime)] +//! #[cfg(feature = "try-runtime")] //! fn post_upgrade(state: Vec<u8>) -> Result<(), &'static str> {} //! ``` //! @@ -152,9 +152,9 @@ //! //! Similarly, each pallet can expose a function in `#[pallet::hooks]` section as follows: //! -//! ``` -//! #[cfg(feature = try-runtime)] -//! fn try_state(_) -> Result<(), &'static str> {} +//! ```ignore +//! #[cfg(feature = "try-runtime")] +//! fn try_state(_: BlockNumber) -> Result<(), &'static str> {} //! ``` //! //! which is called on numerous code paths in the try-runtime tool. These checks should ensure that