Skip to content

Commit

Permalink
Change upgrade_client_proposal_handler -> `execute_upgrade_client_p…
Browse files Browse the repository at this point in the history
…roposal`
  • Loading branch information
seanchen1991 committed Mar 25, 2024
1 parent c849a64 commit 02e7450
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion ibc-core/ics02-client/types/src/msgs/recover_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ pub const RECOVER_CLIENT_TYPE_URL: &str = "/ibc.core.client.v1.MsgRecoverClient"
/// Defines the message used to recover a frozen or expired client.
///
/// Note that a frozen or expired client can only be recovered by passing
/// a governance proposal.
/// a governance proposal. For this reason, ibc-rs does not export dispatching
/// a `MsgRecoverClient` via the `dispatch` function. In other words, the
/// client recovery functionality is not part of ibc-rs's public API. The
/// intended usage of this message type is to be integrated with hosts'
/// governance modules, not to be called directly via `dispatch`.
#[cfg_attr(
feature = "borsh",
derive(borsh::BorshSerialize, borsh::BorshDeserialize)

Check warning on line 23 in ibc-core/ics02-client/types/src/msgs/recover_client.rs

View check run for this annotation

Codecov / codecov/patch

ibc-core/ics02-client/types/src/msgs/recover_client.rs#L23

Added line #L23 was not covered by tests
Expand Down
4 changes: 2 additions & 2 deletions ibc-core/ics24-host/cosmos/src/upgrade_proposal/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ use tendermint::abci::Event as TmEvent;
use super::UpgradedClientStateRef;
use crate::upgrade_proposal::{UpgradeClientProposal, UpgradeExecutionContext, UpgradeProposal};

/// Handles an upgrade client proposal
/// Executes an upgrade client proposal.
///
/// It clears both IBC client and consensus states if a previous plan was set.
/// Then it will schedule an upgrade and finally set the upgraded client state
/// in upgrade store.
pub fn upgrade_client_proposal_handler<Ctx>(
pub fn execute_upgrade_client_proposal<Ctx>(

Check warning on line 15 in ibc-core/ics24-host/cosmos/src/upgrade_proposal/handler.rs

View check run for this annotation

Codecov / codecov/patch

ibc-core/ics24-host/cosmos/src/upgrade_proposal/handler.rs#L15

Added line #L15 was not covered by tests
ctx: &mut Ctx,
proposal: UpgradeProposal,
) -> Result<TmEvent, UpgradeClientError>
Expand Down
2 changes: 1 addition & 1 deletion ibc-core/ics24-host/cosmos/src/upgrade_proposal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ mod proposal;

pub use context::*;
pub use events::{UpgradeChain, UpgradeClientProposal};
pub use handler::upgrade_client_proposal_handler;
pub use handler::execute_upgrade_client_proposal;
pub use plan::Plan;
pub use proposal::UpgradeProposal;

0 comments on commit 02e7450

Please sign in to comment.