diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs index 988c9b43ff3893da774cdc707856fd0953d59e2a..a05d58577b4ff3e72e8cfa9f150222e6518793cc 100644 --- a/pallets/distance/src/mock.rs +++ b/pallets/distance/src/mock.rs @@ -245,8 +245,6 @@ impl pallet_identity::Config for Test { type OnIdtyChange = (); type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = (); } parameter_types! { diff --git a/pallets/duniter-wot/src/mock.rs b/pallets/duniter-wot/src/mock.rs index 9420b482f4f48a76047750cfdd8d289f1677f83b..268a6bf01a9805254cdf1d0c70ee90cafc8a668a 100644 --- a/pallets/duniter-wot/src/mock.rs +++ b/pallets/duniter-wot/src/mock.rs @@ -138,8 +138,6 @@ impl pallet_identity::Config for Test { type OnIdtyChange = (DuniterWot, SmithSubWot); type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = (); } // Membership diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index 17c4d38450fe53ba73f5fbd54609793ca6578e3e..c9656a498241438b2cb16196ae8398b6090f7359 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -125,9 +125,6 @@ pub mod pallet { type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; /// Type representing the weight of this pallet type WeightInfo: WeightInfo; - /// Type representing the a distance handler to prepare identity for benchmarking - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler: SetupBenchmark<Self::IdtyIndex, Self::AccountId>; } // GENESIS STUFF // diff --git a/pallets/identity/src/mock.rs b/pallets/identity/src/mock.rs index 9421a70f03547f9b1f426658289cbf9f1b870025..59242164b589612193f65cec8430810727653b3c 100644 --- a/pallets/identity/src/mock.rs +++ b/pallets/identity/src/mock.rs @@ -118,8 +118,6 @@ impl pallet_identity::Config for Test { type OnIdtyChange = (); type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = (); } // Build genesis storage according to the mock runtime. diff --git a/pallets/identity/src/traits.rs b/pallets/identity/src/traits.rs index 95bd3064150772a6ed7e36f68b3e9af97c7e5536..925714813793a69a99b22438043e3cc92ab60a4c 100644 --- a/pallets/identity/src/traits.rs +++ b/pallets/identity/src/traits.rs @@ -60,16 +60,3 @@ impl<AccountId, IdtyIndex> LinkIdty<AccountId, IdtyIndex> for () { Ok(()) } } - -/// trait used only in benchmarks to prepare identity for benchmarking -#[cfg(feature = "runtime-benchmarks")] -pub trait SetupBenchmark<IndtyIndex, AccountId> { - fn force_status_ok(idty_index: &IndtyIndex, account: &AccountId) -> (); - fn add_cert(issuer: &IndtyIndex, receiver: &IndtyIndex) -> (); -} - -#[cfg(feature = "runtime-benchmarks")] -impl<IdtyIndex, AccountId> SetupBenchmark<IdtyIndex, AccountId> for () { - fn force_status_ok(_idty_id: &IdtyIndex, _account: &AccountId) -> () {} - fn add_cert(_issuer: &IdtyIndex, _receiver: &IdtyIndex) -> () {} -} diff --git a/pallets/quota/src/mock.rs b/pallets/quota/src/mock.rs index d023eebeefd5907e62481cf589bab26a531f8cc4..06548263bd8b14e02e5fefcef2101ae8a915a1a5 100644 --- a/pallets/quota/src/mock.rs +++ b/pallets/quota/src/mock.rs @@ -164,8 +164,6 @@ impl pallet_identity::Config for Test { type OnIdtyChange = (); type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = (); } // Build genesis storage according to the mock runtime. diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index cf6728e0b911d1c7f980cfaf772a968e9d113781..b0a05f38687daa1dec53e018dc3341da4745c56d 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -482,8 +482,6 @@ macro_rules! pallets_config { type OnIdtyChange = (Wot, SmithSubWot, Quota); type RuntimeEvent = RuntimeEvent; type WeightInfo = common_runtime::weights::pallet_identity::WeightInfo<Runtime>; - #[cfg(feature = "runtime-benchmarks")] - type BenchmarkSetupHandler = common_runtime::providers::BenchmarkSetupHandler<Runtime>; } impl pallet_membership::Config<frame_support::instances::Instance1> for Runtime { diff --git a/runtime/common/src/providers.rs b/runtime/common/src/providers.rs index b9d23572036dd5ae23b1393adea35535e5cb0c4e..8eb38d6e71db69d27b6c49383d9eba5842af1b5b 100644 --- a/runtime/common/src/providers.rs +++ b/runtime/common/src/providers.rs @@ -160,5 +160,3 @@ macro_rules! impl_benchmark_setup_handler { #[cfg(feature = "runtime-benchmarks")] impl_benchmark_setup_handler!(pallet_membership::SetupBenchmark<<T as pallet_identity::Config>::IdtyIndex, T::AccountId>); -#[cfg(feature = "runtime-benchmarks")] -impl_benchmark_setup_handler!(pallet_identity::traits::SetupBenchmark<<T as pallet_identity::Config>::IdtyIndex, T::AccountId>);