pub trait Config: Config {
type WeightInfo: WeightInfo;
type BlockAuthor: Member + Parameter + MaxEncodedLen;
type DelegatorId: Member + Parameter + MaxEncodedLen;
const TARGET_INHERENT_ID: InherentIdentifier;
// Required methods
fn should_release_data(slot: Slot) -> Option<Slot>;
fn blocks_produced_up_to_slot(
slot: Slot,
) -> impl Iterator<Item = (Slot, Self::BlockAuthor)>;
fn discard_blocks_produced_up_to_slot(slot: Slot);
}
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 Constants§
Sourceconst TARGET_INHERENT_ID: InherentIdentifier
const TARGET_INHERENT_ID: InherentIdentifier
Inherent ID under which block participation data should be provided. It should be set to the ID used by the pallet that will process participation data for paying out block rewards or other purposes.
Required Associated Types§
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight info for this pallet’s extrinsics
Sourcetype BlockAuthor: Member + Parameter + MaxEncodedLen
type BlockAuthor: Member + Parameter + MaxEncodedLen
Type identifying the producer of a block on the Partner Chain
Sourcetype DelegatorId: Member + Parameter + MaxEncodedLen
type DelegatorId: Member + Parameter + MaxEncodedLen
Type identifying indirect block production participants on the Partner Chain This can be native stakers on Partner Chain, stakers on the main chain or other.
Required Methods§
Sourcefn should_release_data(slot: Slot) -> Option<Slot>
fn should_release_data(slot: Slot) -> Option<Slot>
Should return slot up to which block production data should be released or None.
Sourcefn blocks_produced_up_to_slot(
slot: Slot,
) -> impl Iterator<Item = (Slot, Self::BlockAuthor)>
fn blocks_produced_up_to_slot( slot: Slot, ) -> impl Iterator<Item = (Slot, Self::BlockAuthor)>
Returns block authors since last processing up to slot
Sourcefn discard_blocks_produced_up_to_slot(slot: Slot)
fn discard_blocks_produced_up_to_slot(slot: Slot)
Discards block production data at the source up to slot
This should remove exactly the same data as returned by blocks_produced_up_to_slot
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.