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§

Required Methods§

source

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

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

source

fn upgraded_client_state( &self, upgrade_path: &UpgradeClientPath ) -> Result<Self::AnyClientState, UpgradeClientError>

Returns the upgraded client state at the specified upgrade path.

source

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.

Implementors§