1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use pallet_session::{historical::NoteHistoricalRoot, Config};
use sp_runtime::traits::OpaqueKeys;
use sp_std::prelude::*;
use crate::*;
use darwinia_staking::StashOf;
sp_runtime::impl_opaque_keys! {
pub struct SessionKeys {
pub babe: Babe,
pub grandpa: Grandpa,
pub beefy: Beefy,
pub im_online: ImOnline,
pub authority_discovery: AuthorityDiscovery,
}
}
impl Config for Runtime {
type Event = Event;
type Keys = SessionKeys;
type NextSessionRotation = Babe;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type SessionManager = NoteHistoricalRoot<Self, Staking>;
type ShouldEndSession = Babe;
type ValidatorId = AccountId;
type ValidatorIdOf = StashOf<Self>;
type WeightInfo = ();
}