Kagome
Polkadot Runtime Engine in C++17
slot.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_SLOT_HPP
7 #define KAGOME_SLOT_HPP
8 
9 #include <cstdint>
10 
11 namespace kagome::consensus {
12 
13  enum class SlotType : uint8_t {
15  Primary = 1,
17  SecondaryPlain = 2,
19  SecondaryVRF = 3,
20  };
21 
22  inline std::string_view to_string(SlotType s) {
23  switch (s) {
24  case SlotType::Primary:
25  return "Primary";
27  return "Secondary Plain";
29  return "Secondary VRF";
30  }
31  return "Unknown";
32  }
33 
34 } // namespace kagome::consensus
35 
36 #endif // KAGOME_SLOT_HPP
A secondary deterministic slot assignment.
std::string_view to_string(SlotType s)
Definition: slot.hpp:22
A secondary deterministic slot assignment with VRF outputs.
A primary VRF-based slot assignment.