Skip to content

Commit

Permalink
make pool members and stakers exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
Ank4n committed Jun 15, 2024
1 parent 2b1739d commit f77ddfc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,10 @@ impl pallet_staking::Config for Runtime {
type EventListeners = (NominationPools, DelegatedStaking);
type WeightInfo = weights::pallet_staking::WeightInfo<Runtime>;
type DisablingStrategy = pallet_staking::UpToLimitDisablingStrategy;
// Due to difference in how pools and staking pallets handle currency locks, we want to keep
// pool members and stakers mutually exclusive. Hence, we prevent pool members from directly
// staking.
type Blacklist = pallet_nomination_pools::AllPoolMembers<Self>;
}

impl pallet_fast_unstake::Config for Runtime {
Expand Down Expand Up @@ -1367,7 +1371,11 @@ impl pallet_nomination_pools::Config for Runtime {
type PalletId = PoolsPalletId;
type MaxPointsToBalance = MaxPointsToBalance;
type AdminOrigin = EitherOf<EnsureRoot<AccountId>, StakingAdmin>;
type Blacklist = Nothing;
// Due to difference in how pools and staking pallets handle currency locks, we want to keep
// pool members and stakers mutually exclusive. Hence, we want to prevent stakers from using
// the pool pallet. Any existing account that is already in the pool but blacklisted can still
// withdraw funds but cannot add new funds.
type Blacklist = pallet_staking::AllStakers<Self>;
}

parameter_types! {
Expand Down

0 comments on commit f77ddfc

Please sign in to comment.