From b5a248137fba4fc28471cbf9ca51a9d3fdeb7f5b Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Andres <11448715+al3mart@users.noreply.github.com> Date: Sun, 27 Apr 2025 15:49:49 +0200 Subject: [PATCH] feat(session): implement DisablingStrategy --- runtime/devnet/src/lib.rs | 1 + runtime/mainnet/src/config/collation.rs | 9 +++++++++ runtime/testnet/src/config/collation.rs | 1 + 3 files changed, 11 insertions(+) diff --git a/runtime/devnet/src/lib.rs b/runtime/devnet/src/lib.rs index 9dbf0ace1..441abfb07 100644 --- a/runtime/devnet/src/lib.rs +++ b/runtime/devnet/src/lib.rs @@ -442,6 +442,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { + type DisablingStrategy = (); type Keys = SessionKeys; type NextSessionRotation = pallet_session::PeriodicSessions; type RuntimeEvent = RuntimeEvent; diff --git a/runtime/mainnet/src/config/collation.rs b/runtime/mainnet/src/config/collation.rs index c7d57d946..8345ec5d1 100644 --- a/runtime/mainnet/src/config/collation.rs +++ b/runtime/mainnet/src/config/collation.rs @@ -56,6 +56,7 @@ impl pallet_collator_selection::Config for Runtime { impl cumulus_pallet_aura_ext::Config for Runtime {} impl pallet_session::Config for Runtime { + type DisablingStrategy = (); type Keys = SessionKeys; type NextSessionRotation = pallet_session::PeriodicSessions; type RuntimeEvent = RuntimeEvent; @@ -255,6 +256,14 @@ mod tests { mod session { use super::*; + #[test] + fn ensures_no_disabling_strategy() { + assert_eq!( + TypeId::of::<::DisablingStrategy>(), + TypeId::of::<()>(), + ); + } + #[test] fn keys_provided_by_aura() { // Session keys implementation uses aura-defined authority identifier type diff --git a/runtime/testnet/src/config/collation.rs b/runtime/testnet/src/config/collation.rs index e23eaf8a8..94f54971e 100644 --- a/runtime/testnet/src/config/collation.rs +++ b/runtime/testnet/src/config/collation.rs @@ -58,6 +58,7 @@ parameter_types! { } impl pallet_session::Config for Runtime { + type DisablingStrategy = (); type Keys = SessionKeys; type NextSessionRotation = pallet_session::PeriodicSessions; type RuntimeEvent = RuntimeEvent;