Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code clean-up remained from v0.37.0 #622

Merged
merged 4 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/unreleased/breaking-changes/622-v0.37.0-cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Code clean-up remained from v0.37.0 release
- ([#622](https://github.com/cosmos/ibc-
rs/issues/622))
plafer marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ There are consensus-breaking changes.
- Check if `ClientStatePath` is empty during client creation process
([#604](https://github.com/cosmos/ibc-rs/issues/604))

### BUG
### BUG FIXES

- Disallow creation of new Tendermint client state instance with a frozen height
([#178](https://github.com/cosmos/ibc-rs/issues/178))
Expand All @@ -45,7 +45,7 @@ There are consensus-breaking changes.
height is updated
([#601](https://github.com/cosmos/ibc-rs/issues/601))

### FEATURE
### FEATURES

- Prefixed denom parity scale codec enabled
([#577](https://github.com/cosmos/ibc-rs/pull/577))
Expand Down
4 changes: 2 additions & 2 deletions crates/ibc/src/clients/ics07_tendermint/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ pub enum Error {
InvalidRawClientState { reason: String },
/// missing validator set
MissingValidatorSet,
/// missing trusted validator set
MissingTrustedValidatorSet,
/// missing trusted next validator set
MissingTrustedNextValidatorSet,
/// missing trusted height
MissingTrustedHeight,
/// missing trusting period
Expand Down
2 changes: 1 addition & 1 deletion crates/ibc/src/clients/ics07_tendermint/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl TryFrom<RawHeader> for Header {
.ok_or(Error::MissingTrustedHeight)?,
trusted_next_validator_set: raw
.trusted_validators
.ok_or(Error::MissingTrustedValidatorSet)?
.ok_or(Error::MissingTrustedNextValidatorSet)?
.try_into()
.map_err(Error::InvalidRawHeader)?,
};
Expand Down
9 changes: 4 additions & 5 deletions crates/ibc/src/core/ics02_client/handler/update_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ where
signer: _,
} = msg;

// Read client type from the host chain store. The client should already exist.
// Read client state from the host chain store.
// Read client state from the host chain store. The client should already exist.
let client_state = ctx.client_state(&client_id)?;

client_state.confirm_not_frozen()?;

client_state
.verify_client_message(ctx, &client_id, client_message, &update_kind)
.map_err(ContextError::from)
client_state.verify_client_message(ctx, &client_id, client_message, &update_kind)?;

Ok(())
}

pub(crate) fn execute<Ctx>(ctx: &mut Ctx, msg: MsgUpdateClient) -> Result<(), ContextError>
Expand Down