Equivocation
Variant 127 v393sp_consensus_grandpa::Equivocation
About This Type
Enum type: Equivocation.
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 (2)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | Prevote | ||
| 1 | Precommit |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 2 possible variants.
- Size
- variable (1+ bytes)
Examples
Prevote = Prevote(Equivocation)
0x00<field0>00 Variant index 0 = Prevotefield 0 field0: EquivocationPrecommit = Precommit(Equivocation)
0x01<field0>01 Variant index 1 = Precommitfield 0 field0: EquivocationCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Equivocation — variant "Prevote"
const value = registry.createType("Equivocation", { Prevote: { value: 0 } });
console.log("Hex:", value.toHex());Type Parameters
H = H256
N = u32
Referenced By (1)
Type Information
- Type ID
- 127
- Kind
- Variant
- Path
- sp_consensus_grandpa::Equivocation
- Runtime
- v393