diff --git a/crates/ibc/src/client_state.rs b/crates/ibc/src/client_state.rs index c564512..deb4c66 100644 --- a/crates/ibc/src/client_state.rs +++ b/crates/ibc/src/client_state.rs @@ -301,6 +301,9 @@ impl Ics2ClientState for ClientState Result, ClientError> { self.validate()?; + if self.is_frozen() { + return Err(Error::CannotInitializeFrozenClient.into()); + } let consensus_state = ConsensusState::try_from(consensus_state)?; consensus_state.validate()?; Ok(ConsensusState::into_box(consensus_state)) diff --git a/crates/ibc/src/errors.rs b/crates/ibc/src/errors.rs index d50f9a7..1272333 100644 --- a/crates/ibc/src/errors.rs +++ b/crates/ibc/src/errors.rs @@ -111,6 +111,8 @@ pub enum Error { ProtoMissingFieldError(String), /// unknown message type: `{0}` UnknownMessageType(String), + /// cannot initialize frozen client + CannotInitializeFrozenClient, } impl Error {