Skip to content

Commit

Permalink
check if client at counterparty is frozen
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Jun 28, 2024
1 parent 70ee150 commit 351eb29
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions ibc-testkit/src/testapp/ibc/core/core_ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,19 @@ where
&self,
client_state_of_host_on_counterparty: Self::HostClientState,
) -> Result<(), ContextError> {
// // FIXME(rano): is_frozen is specific to Tendermint or Mock client state.
// if client_state_of_host_on_counterparty.is_frozen() {
// return Err(ClientError::ClientFrozen {
// description: String::new(),
// }
// .into());
// }
// TODO(rano): simplify the status method. The client id is not needed here as the client state is at remote chain.
// We use a nonexisting client id to be able to call this method.
// Note, this will never return `Status::Active` and in happy cases it will return `Status::Expired` as
// the client state will not be found.
if client_state_of_host_on_counterparty
.status(self, &ClientId::new("nonexisting", 999).expect("no error"))?
.is_frozen()
{
return Err(ClientError::ClientFrozen {
description: String::new(),
}
.into());
}

let latest_height = self.host_height()?;

Expand Down

0 comments on commit 351eb29

Please sign in to comment.