AllowedSlots
Variant 714 v393sp_consensus_babe::AllowedSlots
About This Type
Enum type: AllowedSlots.
A tagged union where the first byte selects which variant is active, followed by that variant's data.
Encoding: 1-byte variant index followed by the selected variant's field data.
Variants (3)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | PrimarySlots | none | |
| 1 | PrimaryAndSecondaryPlainSlots | none | |
| 2 | PrimaryAndSecondaryVRFSlots | none |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 3 possible variants.
- Size
- variable (1+ bytes)
Examples
PrimarySlots
0x0000 Variant index 0 = PrimarySlotsPrimaryAndSecondaryPlainSlots
0x0101 Variant index 1 = PrimaryAndSecondaryPlainSlotsPrimaryAndSecondaryVRFSlots
0x0202 Variant index 2 = PrimaryAndSecondaryVRFSlotsCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode AllowedSlots — variant "PrimarySlots"
const value = registry.createType("AllowedSlots", "PrimarySlots");
console.log("Hex:", value.toHex());Referenced By (2)
Type Information
- Type ID
- 714
- Kind
- Variant
- Path
- sp_consensus_babe::AllowedSlots
- Runtime
- v393