referrerpolicy=no-referrer-when-downgrade

Type Alias pallet_sassafras::pallet::TicketsIds

source ·
pub type TicketsIds<T> = StorageMap<_GeneratedPrefixForStorageTicketsIds<T>, Identity, (u8, u32), TicketId>;
Expand description

Tickets identifiers map.

The map holds tickets ids for the current and next epoch.

The key is a tuple composed by:

  • u8 equal to epoch’s index modulo 2;
  • u32 equal to the ticket’s index in a sorted list of epoch’s tickets.

Epoch X first N-th ticket has key (X mod 2, N)

Note that the ticket’s index doesn’t directly correspond to the slot index within the epoch. The assignment is computed dynamically using an outside-in strategy.

Be aware that entries within this map are never removed, only overwritten. Last element index should be fetched from the TicketsMeta value.

Storage type is [StorageMap] with key type (u8, u32) and value type TicketId.

Aliased Type§

struct TicketsIds<T>(/* private fields */);