referrerpolicy=no-referrer-when-downgrade
pallet_staking_async_ah_client

Trait SendToAssetHub

Source
pub trait SendToAssetHub {
    type AccountId;

    // Required methods
    fn relay_session_report(session_report: SessionReport<Self::AccountId>);
    fn relay_new_offence(
        session_index: SessionIndex,
        offences: Vec<Offence<Self::AccountId>>,
    );
}
Expand description

The interface to communicate to asset hub.

This trait should only encapsulate our outgoing communications. Any incoming message is handled with Calls.

In a real runtime, this is implemented via XCM calls, much like how the coretime pallet works. In a test runtime, it can be wired to direct function call.

Required Associated Types§

Source

type AccountId

The validator account ids.

Required Methods§

Source

fn relay_session_report(session_report: SessionReport<Self::AccountId>)

Report a session change to AssetHub.

Source

fn relay_new_offence( session_index: SessionIndex, offences: Vec<Offence<Self::AccountId>>, )

Report new offences.

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.

Implementations on Foreign Types§

Source§

impl SendToAssetHub for ()

A no-op implementation of SendToAssetHub.

Source§

type AccountId = u64

Source§

fn relay_session_report(_session_report: SessionReport<Self::AccountId>)

Source§

fn relay_new_offence( _session_index: SessionIndex, _offences: Vec<Offence<Self::AccountId>>, )

Implementors§