Skip to content

Commit

Permalink
Code clean-up remained from v0.37.0 (#622)
Browse files Browse the repository at this point in the history
* Code clean-up remained from v0.37.0

* Revise pr number

* Adapt changelog

* Update .changelog/unreleased/breaking-changes/622-v0.37.0-cleanup.md

Signed-off-by: Philippe Laferrière <[email protected]>

---------

Signed-off-by: Philippe Laferrière <[email protected]>
Co-authored-by: Philippe Laferrière <[email protected]>
  • Loading branch information
Farhad-Shabani and plafer authored Apr 14, 2023
1 parent 014fec6 commit 320df85
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 2 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,2 @@
- Code clean-up remained from v0.37.0 release
- ([#622](https://github.com/cosmos/ibc-rs/issues/622))
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

0 comments on commit 320df85

Please sign in to comment.