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§
Sourcetype MaxValidatorSet: Get<u32>
type MaxValidatorSet: Get<u32>
Maximum number of validators that the staking system may have.
Required Methods§
Sourcefn on_relay_session_report(report: SessionReport<Self::AccountId>)
fn on_relay_session_report(report: SessionReport<Self::AccountId>)
New session report from the relay chain.
Sourcefn on_new_offences(
slash_session: SessionIndex,
offences: Vec<Offence<Self::AccountId>>,
)
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.