mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
staking: only disable slashed validators and keep them disabled for whole era (#9448)
* session: remove disabled validators threshold logic * staking: add logic to track offending validators * staking: disable validators for the whole era * frame: fix tests * staking: add tests for disabling validators handling * staking: fix adding offending validator when already slashed in era * address review comments * session, staking: add comments about sorted vecs Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
@@ -117,7 +117,7 @@ impl pallet_session::SessionHandler<AccountId> for TestSessionHandler {
|
||||
) {
|
||||
}
|
||||
|
||||
fn on_disabled(_: usize) {}
|
||||
fn on_disabled(_: u32) {}
|
||||
}
|
||||
|
||||
impl pallet_session::Config for Test {
|
||||
@@ -129,7 +129,6 @@ impl pallet_session::Config for Test {
|
||||
type Event = Event;
|
||||
type ValidatorId = AccountId;
|
||||
type ValidatorIdOf = pallet_staking::StashOf<Test>;
|
||||
type DisabledValidatorsThreshold = ();
|
||||
type WeightInfo = ();
|
||||
}
|
||||
pallet_staking_reward_curve::build! {
|
||||
@@ -180,6 +179,7 @@ impl pallet_staking::Config for Test {
|
||||
type EraPayout = pallet_staking::ConvertCurve<RewardCurve>;
|
||||
type NextNewSession = Session;
|
||||
type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator;
|
||||
type OffendingValidatorsThreshold = ();
|
||||
type ElectionProvider = onchain::OnChainSequentialPhragmen<Self>;
|
||||
type GenesisElectionProvider = Self::ElectionProvider;
|
||||
type SortedListProvider = pallet_staking::UseNominatorsMap<Self>;
|
||||
|
||||
Reference in New Issue
Block a user