[][src]Crate srml_session

Session Module

The Session module allows validators to manage their session keys, provides a function for changing the session length, and handles session rotation.

Overview

Terminology

Goals

The Session module in Substrate is designed to make the following possible:

Interface

Dispatchable Functions

Public Functions

Usage

Example from the SRML

The Staking module uses the Session module to get the validator set.

use srml_session as session;

let validators = <session::Module<T>>::validators();

Structs

CurrentIndex

Current index of the session.

CurrentStart

Timestamp when current session started.

ForcingNewSession

New session is being forced if this entry exists; in which case, the boolean value is true if the new session should be considered a normal rotation (rewardable) and false if the new session should be considered exceptional (slashable).

GenesisConfig
Module
SessionLength

Current length of the session.

Validators

The current set of validators.

Enums

Call
RawEvent

Events for this module.

Traits

OnSessionChange

A session has changed.

Trait

Type Definitions

Event

RawEvent specialized for the configuration Trait