referrerpolicy=no-referrer-when-downgrade
cumulus_pallet_parachain_system

Trait RelaychainStateProvider

Source
pub trait RelaychainStateProvider {
    // Required method
    fn current_relay_chain_state() -> RelayChainState;

    // Provided method
    fn set_current_relay_chain_state(_state: RelayChainState) { ... }
}
Expand description

This exposes the RelayChainState to other runtime modules.

Enables parachains to read relay chain state via state proofs.

Required Methods§

Source

fn current_relay_chain_state() -> RelayChainState

May be called by any runtime module to obtain the current state of the relay chain.

NOTE: This is not guaranteed to return monotonically increasing relay parents.

Provided Methods§

Source

fn set_current_relay_chain_state(_state: RelayChainState)

Utility function only to be used in benchmarking scenarios, to be implemented optionally, else a noop.

It allows for setting a custom RelayChainState.

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§