Trait pallet_session::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>;
type ValidatorId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + TryFrom<Self::AccountId>;
type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>;
type ShouldEndSession: ShouldEndSession<Self::BlockNumber>;
type NextSessionRotation: EstimateNextSessionRotation<Self::BlockNumber>;
type SessionManager: SessionManager<Self::ValidatorId>;
type SessionHandler: SessionHandler<Self::ValidatorId>;
type Keys: OpaqueKeys + Member + Parameter + MaybeSerializeDeserialize;
type WeightInfo: WeightInfo;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
sourcetype RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype ValidatorId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + TryFrom<Self::AccountId>
type ValidatorId: Member + Parameter + MaybeSerializeDeserialize + MaxEncodedLen + TryFrom<Self::AccountId>
A stable ID for a validator.
sourcetype ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>
type ValidatorIdOf: Convert<Self::AccountId, Option<Self::ValidatorId>>
A conversion from account ID to validator ID.
Its cost must be at most one storage read.
sourcetype ShouldEndSession: ShouldEndSession<Self::BlockNumber>
type ShouldEndSession: ShouldEndSession<Self::BlockNumber>
Indicator for when to end the session.
sourcetype NextSessionRotation: EstimateNextSessionRotation<Self::BlockNumber>
type NextSessionRotation: EstimateNextSessionRotation<Self::BlockNumber>
Something that can predict the next session rotation. This should typically come from
the same logical unit that provides ShouldEndSession
, yet, it gives a best effort
estimate. It is helpful to implement EstimateNextNewSession
.
sourcetype SessionManager: SessionManager<Self::ValidatorId>
type SessionManager: SessionManager<Self::ValidatorId>
Handler for managing new session.
sourcetype SessionHandler: SessionHandler<Self::ValidatorId>
type SessionHandler: SessionHandler<Self::ValidatorId>
Handler when a session has changed.
sourcetype Keys: OpaqueKeys + Member + Parameter + MaybeSerializeDeserialize
type Keys: OpaqueKeys + Member + Parameter + MaybeSerializeDeserialize
The keys.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.