pub type ForceMaxElected<T: Config> = StorageValue<_GeneratedPrefixForStorageForceMaxElected<T>, bool, ValueQuery>;Expand description
A strictness flag controlling how the system enforces the MaxElected limit.
§Behavior
- When
true:
The system forcefully truncates the elected list toMaxElectedbefore persisting. - When
false:
The system performs a safe bounded check; it fails (returns error) if any bounds are enforced by the underlying storage instead of truncating automatically i.e., a [WeakBoundedVec].
§Purpose
This provides governance-level control over whether elections prioritize strict deterministic enforcement (force) or safe bounded validation (fair).
§Example
ForceMaxElected = true-> Automatically keeps top N candidates.ForceMaxElected = false-> Requires manual handling of overflows before storage.
Storage type is [StorageValue] with value type bool.
Aliased Type§
pub struct ForceMaxElected<T: Config>(/* private fields */);