mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
companion for substrate/10377 (#4379)
* companion for substrate/10377 * udpate substrate (cargo update -p sp-io) * fmt
This commit is contained in:
Generated
+339
-422
File diff suppressed because it is too large
Load Diff
@@ -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::*;
|
||||
|
||||
@@ -555,6 +555,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type OffendingValidatorsThreshold = OffendingValidatorsThreshold;
|
||||
// Use the nominators map to iter voters, but also keep bags-list up-to-date.
|
||||
type SortedListProvider = BagsList;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
|
||||
@@ -550,6 +550,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf<Self>;
|
||||
// Use the nominators map to iter voters, but also keep bags-list up-to-date.
|
||||
type SortedListProvider = runtime_common::elections::UseNominatorsAndUpdateBagsList<Runtime>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
|
||||
@@ -345,6 +345,7 @@ impl pallet_staking::Config for Runtime {
|
||||
// Use the nominator map to iter voter AND no-ops for all SortedListProvider hooks. The migration
|
||||
// to bags-list is a no-op, but the storage version will be updated.
|
||||
type SortedListProvider = pallet_staking::UseNominatorsMap<Runtime>;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type WeightInfo = ();
|
||||
}
|
||||
|
||||
|
||||
@@ -459,6 +459,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf<Self>;
|
||||
// Use the nominators map to iter voters, but also keep bags-list up-to-date.
|
||||
type SortedListProvider = BagsList;
|
||||
type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user