pub trait UpgradeValidationContext {
type V: ClientValidationContext;
// Required methods
fn upgrade_plan(&self) -> Result<Plan, HostError>;
fn upgraded_client_state(
&self,
upgrade_path: &UpgradeClientStatePath,
) -> Result<UpgradedClientStateRef<Self>, HostError>;
fn upgraded_consensus_state(
&self,
upgrade_path: &UpgradeConsensusStatePath,
) -> Result<UpgradedConsensusStateRef<Self>, HostError>;
}
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§
Required Methods§
Sourcefn upgrade_plan(&self) -> Result<Plan, HostError>
fn upgrade_plan(&self) -> Result<Plan, HostError>
Returns the upgrade plan that is scheduled and has not been executed yet.
Sourcefn upgraded_client_state(
&self,
upgrade_path: &UpgradeClientStatePath,
) -> Result<UpgradedClientStateRef<Self>, HostError>
fn upgraded_client_state( &self, upgrade_path: &UpgradeClientStatePath, ) -> Result<UpgradedClientStateRef<Self>, HostError>
Returns the upgraded client state at the specified upgrade path.
Sourcefn upgraded_consensus_state(
&self,
upgrade_path: &UpgradeConsensusStatePath,
) -> Result<UpgradedConsensusStateRef<Self>, HostError>
fn upgraded_consensus_state( &self, upgrade_path: &UpgradeConsensusStatePath, ) -> Result<UpgradedConsensusStateRef<Self>, HostError>
Returns the upgraded consensus state at the specified upgrade path.