Skip to content

Commit

Permalink
nit: set correct vallue for the frozen height in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Farhad-Shabani committed Jan 25, 2024
1 parent d715869 commit c1e78b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ibc-clients/ics07-tendermint/src/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,11 @@ where
_client_message: Any,
_update_kind: &UpdateKind,
) -> Result<(), ClientError> {
// NOTE: frozen height is set to `Height {revision_height: 0,
// revision_number: 1}` and it is the same for all misbehaviour. This
// aligns with the
// [`ibc-go`](https://github.com/cosmos/ibc-go/blob/0e3f428e66d6fc0fc6b10d2f3c658aaa5000daf7/modules/light-clients/07-tendermint/misbehaviour.go#L18-L19)
// implementation.
let frozen_client_state = self.0.clone().with_frozen_height(Height::min(0));

let wrapped_frozen_client_state = ClientState::from(frozen_client_state);
Expand Down
2 changes: 1 addition & 1 deletion ibc-clients/ics07-tendermint/types/src/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl TryFrom<RawTmClientState> for ClientState {
};

let client_state = Self::new_without_validation(
chain_id.clone(),
chain_id,
trust_level,
trusting_period,
unbonding_period,
Expand Down
2 changes: 1 addition & 1 deletion ibc-testkit/src/fixtures/clients/tendermint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ mod tests {
// try conversions for when the client is frozen
try_tm_client_state_conversions(RawHeight {
revision_number: 0,
revision_height: 10,
revision_height: 1,
});
}

Expand Down

0 comments on commit c1e78b1

Please sign in to comment.