diff --git a/pallets/distance/src/mock.rs b/pallets/distance/src/mock.rs index c6a6297539faa7fcd75120ff56df8e9128aa7a5d..796237bfffb3847a5ef053260990278495d0e761 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 c89d77aacbcb80a845a9a1f5e96f37f63ea3d867..7fa678e01a46cfc5c40e2ce433818dde0bb09ea7 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 ffc230aa7fdea7ab97547325a2952d23a924294b..640d5e65d0ba9bf8c8a4f84c4e980f3d06d0ae8a 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 efd7dd1571a70ba1d21fbd75d3431711de9a5d1c..11515a27e1486c9087fba7a05a79e8833ef5f49b 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 693292055f85d89573ba25ba40392d90d09aabe3..e3a3d334231c5951de869f6b0137989f12a236b8 100644 --- a/runtime/common/src/providers.rs +++ b/runtime/common/src/providers.rs @@ -158,5 +158,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>);