pub struct Module<T: Config>(_);

Implementations

State of the current authority set.

Pending change: (signaled at, scheduled change).

next block number where we can force a change.

true if we are currently stalled.

The number of changes (both in terms of keys and underlying economic responsibilities) in the “set” of Grandpa validators from genesis.

A mapping from grandpa set ID to the index of the most recent session for which its members were responsible.

TWOX-NOTE: SetId is not under user control.

Get the current set of authorities, along with their respective weights.

Schedule GRANDPA to pause starting in the given number of blocks. Cannot be done when already paused.

Schedule a resume of GRANDPA after pausing.

Schedule a change in the authorities.

The change will be applied at the end of execution of the block in_blocks after the current block. This value may be 0, in which case the change is applied at the end of the current block.

If the forced parameter is defined, this indicates that the current set has been synchronously determined to be offline and that after in_blocks the given change should be applied. The given block number indicates the median last finalized block number and it should be used as the canon block when starting the new grandpa voter.

No change should be signaled while any change is pending. Returns an error if a change is already pending.

Submits an extrinsic to report an equivocation. This method will create an unsigned extrinsic with a call to report_equivocation_unsigned and will push the transaction to the pool. Only useful in an offchain context.

Trait Implementations

The RuntimeAppPublic this type is bound to.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the current version of the pallet.

Returns the version of the pallet that is stored in storage. Read more

Run integrity test. Read more

This function is being called after every block import (when fully synced). Read more

The block is being finalized. Implement to have something happen. Read more

Something that should happen at genesis.

The block is being initialized. Implement to have something happen. Read more

Perform a module upgrade. Read more

The key type expected.

The given validator set will be used for the genesis session. It is guaranteed that the given validator set will also be used for the second session, therefore the first call to on_new_session should provide the same validator set. Read more

Session set has changed; act appropriately. Note that this can be called before initialization of your module. Read more

A validator got disabled. Act accordingly until a new session begins.

A notification for end of the session. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

A ValidateUnsigned implementation that restricts calls to report_equivocation_unsigned to local calls (i.e. extrinsics generated on this node) or that already in a block. This guarantees that only block authors can include unsigned equivocation reports.

The call to validate

Return the validity of the call Read more

Validate the call right before dispatch. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Cast reference.

Cast reference.

Cast mutable reference.

Cast mutable reference.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.