pub type Elected<T: Config> = StorageNMap<_GeneratedPrefixForStorageElected<T>, (NMapKey<Blake2_128Concat, BlockNumberFor<T>>, NMapKey<Blake2_128Concat, Author<T>>), (), OptionQuery>;Expand description
Persistent record of elected authors per block, representing the outcome of each finalized election round.
This is a two-dimensional mapping:
- The block number in which the election was conducted.
- The author (candidate) elected in that block.
- Unit value (only existence matters; no extra metadata stored).
Because this is a StorageNMap, callers can query or iterate over all
authors elected in a given block by iterating over the entries that share
the same block number key.
This design allows efficient historical lookups and auditability over election rounds without overwriting previous results.
§Notes
- This storage is append-only - each election round adds entries under a new block key.
- Multiple authors may be associated with the same block if the election yields more than one winner.
- Overwriting does not occur; historical elections remain queryable indefinitely.
Storage type is [StorageNMap] with keys type (BlockNumberFor < T >, Author < T >) and value type ().
Aliased Type§
pub struct Elected<T: Config>(/* private fields */);