mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 18:41:03 +00:00
Enable bags-list pallet in polkadot (#4080)
* Enable bags-list pallet in polkadot * add files * Remove trailing semicolon * more fixes * Update runtime/polkadot/src/lib.rs * add features * remove par Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -101,7 +101,7 @@ use constants::{currency::*, fee::*, time::*};
|
||||
mod weights;
|
||||
|
||||
// Voter bag threshold definitions.
|
||||
mod voter_bags;
|
||||
mod bag_thresholds;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
@@ -393,7 +393,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const BagThresholds: &'static [u64] = &voter_bags::THRESHOLDS;
|
||||
pub const BagThresholds: &'static [u64] = &bag_thresholds::THRESHOLDS;
|
||||
}
|
||||
|
||||
impl pallet_bags_list::Config for Runtime {
|
||||
@@ -453,8 +453,7 @@ impl pallet_staking::Config for Runtime {
|
||||
type NextNewSession = Session;
|
||||
type ElectionProvider = ElectionProviderMultiPhase;
|
||||
type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf<Self>;
|
||||
// Use the nominators map to iter voters, but also perform the bags-list migration and keep
|
||||
// it up-to-date.
|
||||
// Use the nominators map to iter voters, but also keep bags-list up-to-date.
|
||||
type SortedListProvider = runtime_common::elections::UseNominatorsAndUpdateBagsList<Runtime>;
|
||||
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
|
||||
}
|
||||
@@ -751,7 +750,8 @@ impl InstanceFilter<Call> for ProxyType {
|
||||
Call::Registrar(paras_registrar::Call::reserve{..}) |
|
||||
Call::Crowdloan(..) |
|
||||
Call::Slots(..) |
|
||||
Call::Auctions(..) // Specifically omitting the entire XCM Pallet
|
||||
Call::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||
Call::BagsList(..)
|
||||
),
|
||||
ProxyType::Staking => {
|
||||
matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..))
|
||||
|
||||
Reference in New Issue
Block a user