From 808528ae1f783526aa59bf37d400b468535509ae Mon Sep 17 00:00:00 2001 From: thiolliere Date: Mon, 20 Jan 2020 16:57:39 +0100 Subject: [PATCH 1/2] Update use of session API --- runtime/common/src/parachains.rs | 3 +-- runtime/common/src/registrar.rs | 3 +-- runtime/kusama/src/lib.rs | 3 +-- runtime/polkadot/src/lib.rs | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/runtime/common/src/parachains.rs b/runtime/common/src/parachains.rs index 63d1fc4e9f0b..2e014a17c9c7 100644 --- a/runtime/common/src/parachains.rs +++ b/runtime/common/src/parachains.rs @@ -968,12 +968,11 @@ mod tests { } impl session::Trait for Test { - type OnSessionEnding = (); + type SessionManager = staking::Module; type Keys = UintAuthorityId; type ShouldEndSession = session::PeriodicSessions; type SessionHandler = session::TestSessionHandler; type Event = (); - type SelectInitialValidators = staking::Module; type ValidatorId = u64; type ValidatorIdOf = staking::StashOf; type DisabledValidatorsThreshold = DisabledValidatorsThreshold; diff --git a/runtime/common/src/registrar.rs b/runtime/common/src/registrar.rs index 510b5424b51e..288715b93270 100644 --- a/runtime/common/src/registrar.rs +++ b/runtime/common/src/registrar.rs @@ -688,12 +688,11 @@ mod tests { } impl session::Trait for Test { - type OnSessionEnding = (); + type SessionManager = (); type Keys = UintAuthorityId; type ShouldEndSession = session::PeriodicSessions; type SessionHandler = session::TestSessionHandler; type Event = (); - type SelectInitialValidators = (); type ValidatorId = u64; type ValidatorIdOf = (); type DisabledValidatorsThreshold = DisabledValidatorsThreshold; diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 5e95208bcdf3..9e7d77792bd3 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -241,14 +241,13 @@ parameter_types! { } impl session::Trait for Runtime { - type OnSessionEnding = Staking; + type SessionManager = Staking; type SessionHandler = ::KeyTypeIdProviders; type ShouldEndSession = Babe; type Event = Event; type Keys = SessionKeys; type ValidatorId = AccountId; type ValidatorIdOf = staking::StashOf; - type SelectInitialValidators = Staking; type DisabledValidatorsThreshold = DisabledValidatorsThreshold; } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 7b918e15839d..700bc57aaf1f 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -245,14 +245,13 @@ parameter_types! { } impl session::Trait for Runtime { - type OnSessionEnding = Staking; + type SessionManager = Staking; type SessionHandler = ::KeyTypeIdProviders; type ShouldEndSession = Babe; type Event = Event; type Keys = SessionKeys; type ValidatorId = AccountId; type ValidatorIdOf = staking::StashOf; - type SelectInitialValidators = Staking; type DisabledValidatorsThreshold = DisabledValidatorsThreshold; } From 4eff185fb740f309d36fe82caf6f56cefa09fb10 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Mon, 20 Jan 2020 17:50:48 +0100 Subject: [PATCH 2/2] bump kusama spec version --- runtime/kusama/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 9e7d77792bd3..f01fbaacb46e 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -77,7 +77,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("kusama"), impl_name: create_runtime_str!("parity-kusama"), authoring_version: 2, - spec_version: 1042, + spec_version: 1043, impl_version: 3, apis: RUNTIME_API_VERSIONS, };