Skip to content
Snippets Groups Projects
Commit b590c87d authored by bgallois's avatar bgallois Committed by Hugo Trentesaux
Browse files

remove unused BenchmarkSetupHandler trait

(cherry picked from commit 0aeaa78c)
parent 0d601c42
No related branches found
No related tags found
No related merge requests found
...@@ -245,8 +245,6 @@ impl pallet_identity::Config for Test { ...@@ -245,8 +245,6 @@ impl pallet_identity::Config for Test {
type OnIdtyChange = (); type OnIdtyChange = ();
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = (); type WeightInfo = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetupHandler = ();
} }
parameter_types! { parameter_types! {
......
...@@ -138,8 +138,6 @@ impl pallet_identity::Config for Test { ...@@ -138,8 +138,6 @@ impl pallet_identity::Config for Test {
type OnIdtyChange = (DuniterWot, SmithSubWot); type OnIdtyChange = (DuniterWot, SmithSubWot);
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = (); type WeightInfo = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetupHandler = ();
} }
// Membership // Membership
......
...@@ -125,9 +125,6 @@ pub mod pallet { ...@@ -125,9 +125,6 @@ pub mod pallet {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>; type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
/// Type representing the weight of this pallet /// Type representing the weight of this pallet
type WeightInfo: WeightInfo; 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 // // GENESIS STUFF //
......
...@@ -118,8 +118,6 @@ impl pallet_identity::Config for Test { ...@@ -118,8 +118,6 @@ impl pallet_identity::Config for Test {
type OnIdtyChange = (); type OnIdtyChange = ();
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = (); type WeightInfo = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetupHandler = ();
} }
// Build genesis storage according to the mock runtime. // Build genesis storage according to the mock runtime.
......
...@@ -60,16 +60,3 @@ impl<AccountId, IdtyIndex> LinkIdty<AccountId, IdtyIndex> for () { ...@@ -60,16 +60,3 @@ impl<AccountId, IdtyIndex> LinkIdty<AccountId, IdtyIndex> for () {
Ok(()) 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) -> () {}
}
...@@ -164,8 +164,6 @@ impl pallet_identity::Config for Test { ...@@ -164,8 +164,6 @@ impl pallet_identity::Config for Test {
type OnIdtyChange = (); type OnIdtyChange = ();
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = (); type WeightInfo = ();
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkSetupHandler = ();
} }
// Build genesis storage according to the mock runtime. // Build genesis storage according to the mock runtime.
......
...@@ -482,8 +482,6 @@ macro_rules! pallets_config { ...@@ -482,8 +482,6 @@ macro_rules! pallets_config {
type OnIdtyChange = (Wot, SmithSubWot, Quota); type OnIdtyChange = (Wot, SmithSubWot, Quota);
type RuntimeEvent = RuntimeEvent; type RuntimeEvent = RuntimeEvent;
type WeightInfo = common_runtime::weights::pallet_identity::WeightInfo<Runtime>; 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 { impl pallet_membership::Config<frame_support::instances::Instance1> for Runtime {
......
...@@ -158,5 +158,3 @@ macro_rules! impl_benchmark_setup_handler { ...@@ -158,5 +158,3 @@ macro_rules! impl_benchmark_setup_handler {
#[cfg(feature = "runtime-benchmarks")] #[cfg(feature = "runtime-benchmarks")]
impl_benchmark_setup_handler!(pallet_membership::SetupBenchmark<<T as pallet_identity::Config>::IdtyIndex, T::AccountId>); 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>);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment