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§
sourcefn current_relay_chain_state() -> RelayChainState
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§
sourcefn set_current_relay_chain_state(_state: RelayChainState)
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.
Object Safety§
This trait is not object safe.