referrerpolicy=no-referrer-when-downgrade

Trait AHStakingInterface

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

    // Required methods
    fn on_relay_session_report(report: SessionReport<Self::AccountId>) -> Weight;
    fn weigh_on_relay_session_report(
        report: &SessionReport<Self::AccountId>,
    ) -> Weight;
    fn on_new_offences(
        slash_session: SessionIndex,
        offences: Vec<Offence<Self::AccountId>>,
    ) -> Weight;
    fn weigh_on_new_offences(
        slash_session: SessionIndex,
        offences: &[Offence<Self::AccountId>],
    ) -> Weight;
}
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>) -> Weight

New session report from the relay chain.

Source

fn weigh_on_relay_session_report( report: &SessionReport<Self::AccountId>, ) -> Weight

Return the weight of on_relay_session_report call without executing it.

This will return the worst case estimate of the weight. The actual execution will return the accurate amount.

Source

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

Report one or more offences on the relay chain.

Source

fn weigh_on_new_offences( slash_session: SessionIndex, offences: &[Offence<Self::AccountId>], ) -> Weight

Return the weight of on_new_offences call without executing it.

This will return the worst case estimate of the weight. The actual execution will return the accurate amount.

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§