Grandpa::Error

Variant 403 v393

pallet_grandpa::pallet::Error

The `Error` enum of this pallet.

About This Type

Error enum for the Error pallet.

Contains all error types that the Error pallet can return when a call fails.

Variants (7)

IndexNameFieldsDocs
0PauseFailednoneAttempt to signal GRANDPA pause when the authority set isn't live (either paused or already pending pause).
1ResumeFailednoneAttempt to signal GRANDPA resume when the authority set isn't paused (either live or already pending resume).
2ChangePendingnoneAttempt to signal GRANDPA change with one already pending.
3TooSoonnoneCannot signal forced change so soon after last.
4InvalidKeyOwnershipProofnoneA key ownership proof provided as part of an equivocation report is invalid.
5InvalidEquivocationProofnoneAn equivocation proof provided as part of an equivocation report is invalid.
6DuplicateOffenceReportnoneA given equivocation report is valid but already previously reported.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 7 possible variants.
Size
variable (1+ bytes)

Examples

PauseFailed
0x00
00 Variant index 0 = PauseFailed
ResumeFailed
0x01
01 Variant index 1 = ResumeFailed
ChangePending
0x02
02 Variant index 2 = ChangePending

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode Grandpa::Error — variant "PauseFailed"
const value = registry.createType("Grandpa::Error", "PauseFailed");
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (21)

and 1 more...

Also See

Type Information

Type ID
403
Kind
Variant
Path
pallet_grandpa::pallet::Error
Runtime
v393