pub trait UpgradeValidationContext {
type V: ClientValidationContext;
type E: ClientExecutionContext;
type AnyConsensusState: ConsensusState;
type AnyClientState: ClientState<Self::V, Self::E>;
// Required methods
fn upgrade_plan(&self) -> Result<Plan, UpgradeClientError>;
fn upgraded_client_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<Self::AnyClientState, UpgradeClientError>;
fn upgraded_consensus_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<Self::AnyConsensusState, UpgradeClientError>;
}
Expand description
Helper context to validate client upgrades, providing methods to retrieve an upgrade plan and related upgraded client and consensus states.
Required Associated Types§
type V: ClientValidationContext
type E: ClientExecutionContext
type AnyConsensusState: ConsensusState
type AnyClientState: ClientState<Self::V, Self::E>
Required Methods§
sourcefn upgrade_plan(&self) -> Result<Plan, UpgradeClientError>
fn upgrade_plan(&self) -> Result<Plan, UpgradeClientError>
Returns the upgrade plan that is scheduled and not have been executed yet.
sourcefn upgraded_client_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<Self::AnyClientState, UpgradeClientError>
fn upgraded_client_state( &self, upgrade_path: &UpgradeClientPath ) -> Result<Self::AnyClientState, UpgradeClientError>
Returns the upgraded client state at the specified upgrade path.
sourcefn upgraded_consensus_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<Self::AnyConsensusState, UpgradeClientError>
fn upgraded_consensus_state( &self, upgrade_path: &UpgradeClientPath ) -> Result<Self::AnyConsensusState, UpgradeClientError>
Returns the upgraded consensus state at the specified upgrade path.
Object Safety§
This trait is not object safe.