mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
fix: --feature fast-runtime on westend (#5585)
The westend runtime was missing the fast runtime for `EpochDuration` which caused the epoch be 1 hour which isn't fast. This PR changes the `EpochDuration` to 2 minutes when `--fast-runtime` is enabled, the same as polkadot and kusama.
This commit is contained in:
@@ -44,8 +44,8 @@ use primitives::v2::{
|
||||
};
|
||||
use runtime_common::{
|
||||
assigned_slots, auctions, crowdloan, elections::OnChainAccuracy, impl_runtime_weights,
|
||||
impls::ToAuthor, paras_registrar, paras_sudo_wrapper, slots, BlockHashCount, BlockLength,
|
||||
CurrencyToVote, SlowAdjustingFeeUpdate,
|
||||
impls::ToAuthor, paras_registrar, paras_sudo_wrapper, prod_or_fast, slots, BlockHashCount,
|
||||
BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate,
|
||||
};
|
||||
use runtime_parachains::{
|
||||
configuration as parachains_configuration, disputes as parachains_disputes,
|
||||
@@ -206,7 +206,10 @@ impl pallet_preimage::Config for Runtime {
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const EpochDuration: u64 = EPOCH_DURATION_IN_SLOTS as u64;
|
||||
pub const EpochDuration: u64 = prod_or_fast!(
|
||||
EPOCH_DURATION_IN_SLOTS as u64,
|
||||
2 * MINUTES as u64
|
||||
);
|
||||
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
|
||||
pub const ReportLongevity: u64 =
|
||||
BondingDuration::get() as u64 * SessionsPerEra::get() as u64 * EpochDuration::get();
|
||||
@@ -342,8 +345,14 @@ impl pallet_session::historical::Config for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
// phase durations. 1/4 of the last session for each.
|
||||
pub const SignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4;
|
||||
pub const UnsignedPhase: u32 = EPOCH_DURATION_IN_SLOTS / 4;
|
||||
pub SignedPhase: u32 = prod_or_fast!(
|
||||
EPOCH_DURATION_IN_SLOTS / 4,
|
||||
(1 * MINUTES).min(EpochDuration::get().saturated_into::<u32>() / 2)
|
||||
);
|
||||
pub UnsignedPhase: u32 = prod_or_fast!(
|
||||
EPOCH_DURATION_IN_SLOTS / 4,
|
||||
(1 * MINUTES).min(EpochDuration::get().saturated_into::<u32>() / 2)
|
||||
);
|
||||
|
||||
// signed config
|
||||
pub const SignedMaxSubmissions: u32 = 128;
|
||||
|
||||
Reference in New Issue
Block a user