diff --git a/pallets/pallet-deposit-storage/Cargo.toml b/pallets/pallet-deposit-storage/Cargo.toml index 1865c4ea8f..0373de324b 100644 --- a/pallets/pallet-deposit-storage/Cargo.toml +++ b/pallets/pallet-deposit-storage/Cargo.toml @@ -58,4 +58,4 @@ runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "pallet-balances/runtime-benchmarks", ] -try-runtime = [] +try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/pallet-dip-provider/Cargo.toml b/pallets/pallet-dip-provider/Cargo.toml index e6b1a89d92..12e7f53d59 100644 --- a/pallets/pallet-dip-provider/Cargo.toml +++ b/pallets/pallet-dip-provider/Cargo.toml @@ -57,4 +57,4 @@ std = [ "sp-runtime?/std", ] -try-runtime = [ "did/try-runtime", "frame-support/try-runtime", "kilt-support/try-runtime" ] +try-runtime = ["frame-support/try-runtime"] diff --git a/pallets/pallet-relay-store/Cargo.toml b/pallets/pallet-relay-store/Cargo.toml index f9ac62b733..6c1ede7006 100644 --- a/pallets/pallet-relay-store/Cargo.toml +++ b/pallets/pallet-relay-store/Cargo.toml @@ -55,7 +55,4 @@ runtime-benchmarks = [ "frame-benchmarking", "sp-runtime/runtime-benchmarks", ] -try-runtime = [ - "frame-support/try-runtime", - "frame-system/try-runtime", -] +try-runtime = ["frame-support/try-runtime"] diff --git a/runtimes/peregrine/src/lib.rs b/runtimes/peregrine/src/lib.rs index 25ce86036d..5728a26bd6 100644 --- a/runtimes/peregrine/src/lib.rs +++ b/runtimes/peregrine/src/lib.rs @@ -33,9 +33,6 @@ use frame_support::{ use frame_system::{pallet_prelude::BlockNumberFor, EnsureRoot, EnsureSigned}; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; -#[cfg(feature = "try-runtime")] -use frame_try_runtime::UpgradeCheckSelect; - use sp_api::impl_runtime_apis; use sp_core::{ConstBool, OpaqueMetadata}; use sp_runtime::{ @@ -64,14 +61,6 @@ use runtime_common::{ FeeSplit, Hash, Header, Nonce, Signature, SlowAdjustingFeeUpdate, }; -#[cfg(feature = "std")] -use sp_version::NativeVersion; -#[cfg(feature = "runtime-benchmarks")] -use {kilt_support::signature::AlwaysVerify, runtime_common::benchmarks::DummySignature}; - -#[cfg(any(feature = "std", test))] -pub use sp_runtime::BuildStorage; - #[cfg(test)] mod tests; @@ -101,8 +90,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { /// The version information used to identify this runtime when compiled /// natively. #[cfg(feature = "std")] -pub fn native_version() -> NativeVersion { - NativeVersion { +pub fn native_version() -> sp_version::NativeVersion { + sp_version::NativeVersion { runtime_version: VERSION, can_author_with: Default::default(), } @@ -559,9 +548,9 @@ impl delegation::Config for Runtime { type Signature = did::DidSignature; #[cfg(feature = "runtime-benchmarks")] - type Signature = DummySignature; + type Signature = runtime_common::benchmarks::DummySignature; #[cfg(feature = "runtime-benchmarks")] - type DelegationSignatureVerification = AlwaysVerify, Self::Signature>; + type DelegationSignatureVerification = kilt_support::signature::AlwaysVerify, Self::Signature>; type RuntimeEvent = RuntimeEvent; type RuntimeHoldReason = RuntimeHoldReason; @@ -1473,7 +1462,7 @@ impl_runtime_apis! { #[cfg(feature = "try-runtime")] impl frame_try_runtime::TryRuntime for Runtime { - fn on_runtime_upgrade(checks: UpgradeCheckSelect) -> (Weight, Weight) { + fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) { log::info!("try-runtime::on_runtime_upgrade peregrine."); let weight = Executive::try_runtime_upgrade(checks).unwrap(); (weight, BlockWeights::get().max_block)