Type Alias AuthorAffidavits

Source
pub type AuthorAffidavits<T: Config> = StorageNMap<_GeneratedPrefixForStorageAuthorAffidavits<T>, (NMapKey<Blake2_128Concat, SessionIndex>, NMapKey<Blake2_128Concat, AuthorOf<T>>), (BlockNumberFor<T>, WeakBoundedVec<ElectionWeight<T>, T::MaxAffidavitWeights>), OptionQuery>;
Expand description

Storage mapping of authors’ submitted affidavits per session.

Keyed by:

  1. SessionIndex - the session for which the affidavit applies for election.
  2. AuthorOf - the author submitting the affidavit

Value is a tuple of:

  • [BlockNumberFor]: the block when the affidavit was submitted and,
  • A WeakBoundedVec of ElectionWeight: the author’s declared weights, bounded to prevent excessive storage

This storage is used for:

  • Preparing election candidates for the next session

Storage type is [StorageNMap] with keys type (SessionIndex, AuthorOf < T >) and value type (BlockNumberFor < T > , WeakBoundedVec < ElectionWeight < T > , T :: MaxAffidavitWeights > ,).

Aliased Type§

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