referrerpolicy=no-referrer-when-downgrade
pallet_staking_async_rc_client

Trait AHStakingInterface

Source
pub trait AHStakingInterface {
    type AccountId;
    type MaxValidatorSet: Get<u32>;

    // Required methods
    fn on_relay_session_report(report: SessionReport<Self::AccountId>);
    fn on_new_offences(
        slash_session: SessionIndex,
        offences: Vec<Offence<Self::AccountId>>,
    );
}
Expand description

Our communication trait of pallet-staking-async-rc-client -> pallet-staking-async.

This is merely a shorthand to avoid tightly-coupling the staking pallet to this pallet. It limits what we can say to pallet-staking-async to only these functions.

Required Associated Types§

Source

type AccountId

The validator account id type.

Source

type MaxValidatorSet: Get<u32>

Maximum number of validators that the staking system may have.

Required Methods§

Source

fn on_relay_session_report(report: SessionReport<Self::AccountId>)

New session report from the relay chain.

Source

fn on_new_offences( slash_session: SessionIndex, offences: Vec<Offence<Self::AccountId>>, )

Report one or more offences on the relay chain.

This returns its consumed weight because its complexity is hard to measure.

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§

impl<T: Config> AHStakingInterface for Pallet<T>