referrerpolicy=no-referrer-when-downgrade

Type Alias OffenceQueueEras

Source
pub type OffenceQueueEras<T: Config> = StorageValue<_GeneratedPrefixForStorageOffenceQueueEras<T>, WeakBoundedVec<u32, T::BondingDuration>>;
Expand description

Tracks the eras that contain offences in OffenceQueue, sorted from earliest to latest.

  • This ensures efficient retrieval of the oldest offence without iterating through OffenceQueue.
  • When a new offence is added to OffenceQueue, its era is inserted in sorted order if not already present.
  • When all offences for an era are processed, it is removed from this list.
  • The maximum length of this vector is bounded by BondingDuration.

This eliminates the need for expensive iteration and sorting when fetching the next offence to process.

Storage type is [StorageValue] with value type WeakBoundedVec < u32, T :: BondingDuration >.

Aliased Type§

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