diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 3f77ece6c86a..e399d7a0b35e 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -548,10 +548,19 @@ impl pallet_staking::EraPayout for EraPayout { parameter_types! { // Six sessions in an era (6 hours). pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); + // 28 eras for unbonding (7 days). - pub const BondingDuration: sp_staking::EraIndex = 28; + pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( + 28, + 28, + "DOT_BONDING_DURATION" + ); // 27 eras in which slashes can be cancelled (slightly less than 7 days). - pub const SlashDeferDuration: sp_staking::EraIndex = 27; + pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( + 27, + 27, + "DOT_SLASH_DEFER_DURATION" + ); pub const MaxNominatorRewardedPerValidator: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17); // 24 diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 0f71a37f425f..8beb551db376 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -534,9 +534,18 @@ pallet_staking_reward_curve::build! { parameter_types! { // Six sessions in an era (24 hours). pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1); + // 28 eras for unbonding (28 days). - pub const BondingDuration: sp_staking::EraIndex = 28; - pub const SlashDeferDuration: sp_staking::EraIndex = 27; + pub BondingDuration: sp_staking::EraIndex = prod_or_fast!( + 28, + 28, + "DOT_BONDING_DURATION" + ); + pub SlashDeferDuration: sp_staking::EraIndex = prod_or_fast!( + 27, + 27, + "DOT_SLASH_DEFER_DURATION" + ); pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE; pub const MaxNominatorRewardedPerValidator: u32 = 512; pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);