Config

Trait Config 

Source
pub trait Config: Config {
    type BlockProducerId: Member + Parameter + MaxEncodedLen;
    type Moment: Member + Parameter + MaxEncodedLen + PartialOrd + Ord + PartialEq + Eq;
    type GetAuthor: GetAuthor<Self::BlockProducerId>;
    type GetMoment: GetMoment<Self::Moment>;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

Source

type BlockProducerId: Member + Parameter + MaxEncodedLen

ID type that can represent any block producer in the network. This type should be defined by the Partner Chain Depending on its consensus mechanism and possible block producer types.

Source

type Moment: Member + Parameter + MaxEncodedLen + PartialOrd + Ord + PartialEq + Eq

Type used to identify the moment in time when the block was produced, eg. a timestamp or slot number.

Source

type GetAuthor: GetAuthor<Self::BlockProducerId>

Source of current block’s author

Source

type GetMoment: GetMoment<Self::Moment>

Source of current block’s moment

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§