companion for substrate/10377 (#4379)

* companion for substrate/10377

* udpate substrate (cargo update -p sp-io)

* fmt
This commit is contained in:
Kian Paimani
2021-11-28 15:21:18 +01:00
committed by GitHub
parent 659beec4c9
commit 55f58760f2
6 changed files with 351 additions and 423 deletions
+8 -1
View File
@@ -41,7 +41,7 @@ pub use frame_support::weights::constants::{
};
use frame_support::{
parameter_types,
traits::{Currency, OneSessionHandler},
traits::{ConstU32, Currency, OneSessionHandler},
weights::{constants::WEIGHT_PER_SECOND, DispatchClass, Weight},
};
use frame_system::limits;
@@ -182,6 +182,13 @@ impl<T: pallet_session::Config> OneSessionHandler<T::AccountId>
fn on_disabled(_: u32) {}
}
/// A reasonable benchmarking config for staking pallet.
pub struct StakingBenchmarkingConfig;
impl pallet_staking::BenchmarkingConfig for StakingBenchmarkingConfig {
type MaxValidators = ConstU32<1000>;
type MaxNominators = ConstU32<1000>;
}
#[cfg(test)]
mod multiplier_tests {
use super::*;