mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 14:01:02 +00:00
Add a few staking params to fast-runtime build (#5424)
Co-authored-by: Squirrel <gilescope@gmail.com>
This commit is contained in:
@@ -548,10 +548,19 @@ impl pallet_staking::EraPayout<Balance> for EraPayout {
|
|||||||
parameter_types! {
|
parameter_types! {
|
||||||
// Six sessions in an era (6 hours).
|
// Six sessions in an era (6 hours).
|
||||||
pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1);
|
pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1);
|
||||||
|
|
||||||
// 28 eras for unbonding (7 days).
|
// 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).
|
// 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 MaxNominatorRewardedPerValidator: u32 = 512;
|
||||||
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
||||||
// 24
|
// 24
|
||||||
|
|||||||
@@ -534,9 +534,18 @@ pallet_staking_reward_curve::build! {
|
|||||||
parameter_types! {
|
parameter_types! {
|
||||||
// Six sessions in an era (24 hours).
|
// Six sessions in an era (24 hours).
|
||||||
pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1);
|
pub const SessionsPerEra: SessionIndex = prod_or_fast!(6, 1);
|
||||||
|
|
||||||
// 28 eras for unbonding (28 days).
|
// 28 eras for unbonding (28 days).
|
||||||
pub const BondingDuration: sp_staking::EraIndex = 28;
|
pub BondingDuration: sp_staking::EraIndex = prod_or_fast!(
|
||||||
pub const SlashDeferDuration: sp_staking::EraIndex = 27;
|
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 RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
|
||||||
pub const MaxNominatorRewardedPerValidator: u32 = 512;
|
pub const MaxNominatorRewardedPerValidator: u32 = 512;
|
||||||
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
pub const OffendingValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
||||||
|
|||||||
Reference in New Issue
Block a user