Type Alias ElectsPreparedBy

Source
pub type ElectsPreparedBy<T: Config> = StorageMap<_GeneratedPrefixForStorageElectsPreparedBy<T>, Blake2_128Concat, SessionIndex, (AuthorOf<T>, BlockNumberFor<T>), OptionQuery>;
Expand description

Tracks the author who prepared the election for a given session.

Stores the identity of the election runner and the block number at which they executed the election process for the upcoming session.

This storage is tied to the session index and may be overwritten if multiple election runs occur within the same session.
This ensures that the latest election runner and block number are always recorded.

This allows the pallet to:

  • Identify which author acted as the election runner for auditing or reward purposes.
  • Record the exact block when the election was conducted, ensuring deterministic session transitions.
  • Keep track of the most recent election preparation for the session.

§Storage Structure

  • SessionIndex: the session for which the election was prepared.
  • (AuthorOf, [BlockNumberFor]): tuple of the election runner and the block number of execution.
  • [OptionQuery]: returns None if no election has been prepared for the session or yet.

Storage type is [StorageMap] with key type SessionIndex and value type (AuthorOf < T > , BlockNumberFor < T >).

Aliased Type§

pub struct ElectsPreparedBy<T: Config>(/* private fields */);