pub trait UpgradeValidationContext {
type V: ClientValidationContext;
// Required methods
fn upgrade_plan(&self) -> Result<Plan, UpgradeClientError>;
fn upgraded_client_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<UpgradedClientStateRef<Self>, UpgradeClientError>;
fn upgraded_consensus_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<UpgradedConsensusStateRef<Self>, 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§
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<UpgradedClientStateRef<Self>, UpgradeClientError>
fn upgraded_client_state( &self, upgrade_path: &UpgradeClientPath ) -> Result<UpgradedClientStateRef<Self>, UpgradeClientError>
Returns the upgraded client state at the specified upgrade path.
sourcefn upgraded_consensus_state(
&self,
upgrade_path: &UpgradeClientPath
) -> Result<UpgradedConsensusStateRef<Self>, UpgradeClientError>
fn upgraded_consensus_state( &self, upgrade_path: &UpgradeClientPath ) -> Result<UpgradedConsensusStateRef<Self>, UpgradeClientError>
Returns the upgraded consensus state at the specified upgrade path.