diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index fcfc3cf772..008c519ff7 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -334,6 +334,20 @@ impl pallet_session::historical::Config for Runtime { type FullIdentificationOf = pallet_staking::ExposureOf; } +pub struct MaybeSignedPhase; + +impl Get for MaybeSignedPhase { + fn get() -> u32 { + // 1 day = 4 eras -> 1 week = 28 eras. We want to disable signed phase once a week to test the fallback unsigned + // phase is able to compute elections on Westend. + if Staking::current_era().unwrap_or(1) % 28 == 0 { + 0 + } else { + SignedPhase::get() + } + } +} + parameter_types! { // phase durations. 1/4 of the last session for each. pub SignedPhase: u32 = prod_or_fast!( @@ -415,7 +429,7 @@ impl pallet_election_provider_multi_phase::Config for Runtime { type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EstimateCallFee = TransactionPayment; - type SignedPhase = SignedPhase; + type SignedPhase = MaybeSignedPhase; type UnsignedPhase = UnsignedPhase; type SignedMaxSubmissions = SignedMaxSubmissions; type SignedMaxRefunds = SignedMaxRefunds;