Trait UpgradeValidationContext

Source
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§

Source

fn upgrade_plan(&self) -> Result<Plan, HostError>

Returns the upgrade plan that is scheduled and has not been executed yet.

Source

fn upgraded_client_state( &self, upgrade_path: &UpgradeClientStatePath, ) -> Result<UpgradedClientStateRef<Self>, HostError>

Returns the upgraded client state at the specified upgrade path.

Source

fn upgraded_consensus_state( &self, upgrade_path: &UpgradeConsensusStatePath, ) -> Result<UpgradedConsensusStateRef<Self>, HostError>

Returns the upgraded consensus state at the specified upgrade path.

Implementors§