set SlashinDeferDuration less than BondingDuration and updated SlashCancelOrigin
@@ -355,6 +355,7 @@ parameter_type_with_key! {
}
/// ORML Configurations
+
impl orml_tokens::Config for Runtime {
type Event = Event;
type Balance = Balance;
@@ -450,7 +451,7 @@ pallet_staking_reward_curve::build! {
parameter_types! {
pub const SessionsPerEra: sp_staking::SessionIndex = 6;
pub const BondingDuration: pallet_staking::EraIndex = 24 * 28;
- pub const SlashDeferDuration: pallet_staking::EraIndex = u32::MAX; //"Infinity" - we want to cancel all slashes on snakenet.
+ pub const SlashDeferDuration: pallet_staking::EraIndex = 24 * 28 - 1; //SlashDeferDuration should be less than BondingDuration https://github.com/paritytech/substrate/blob/49a4103f4bfef55be20a5c6d26e18ff3003c3353/frame/staking/src/lib.rs#L1402
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub const MaxNominatorRewardedPerValidator: u32 = 64;
pub const ElectionLookahead: BlockNumber = EPOCH_DURATION_IN_BLOCKS / 4;
@@ -459,11 +460,8 @@ parameter_types! {
pub MinSolutionScoreBump: Perbill = Perbill::from_rational_approximation(5u32, 10_000);
}
-type SlashCancelOrigin = EnsureOneOf<
- AccountId,
- EnsureRoot<AccountId>,
- pallet_collective::EnsureProportionAtLeast<_3, _4, AccountId, CouncilCollective>,
->;
+type SlashCancelOrigin =
+ EnsureOneOf<AccountId, EnsureRoot<AccountId>, pallet_collective::EnsureMember<AccountId, CouncilCollective>>;
impl pallet_staking::Config for Runtime {
type Currency = Balances;
