From b87deea0f4e9db15f339cf13dea09ff1c4cf5eb4 Mon Sep 17 00:00:00 2001 From: Sean Chen Date: Thu, 25 Apr 2024 11:11:29 -0500 Subject: [PATCH] Fix update_on_recovery call in ibc-clients/cw-context --- ibc-clients/cw-context/src/handlers.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ibc-clients/cw-context/src/handlers.rs b/ibc-clients/cw-context/src/handlers.rs index c7ab323dd..024d8e08a 100644 --- a/ibc-clients/cw-context/src/handlers.rs +++ b/ibc-clients/cw-context/src/handlers.rs @@ -126,6 +126,12 @@ impl<'a, C: ClientType<'a>> Context<'a, C> { SudoMsg::MigrateClientStore(_) => { self.set_substitute_prefix(); let substitute_client_state = self.client_state(&client_id)?; + let substitute_consensus_state = + self.consensus_state(&ClientConsensusStatePath::new( + client_id.clone(), + substitute_client_state.latest_height().revision_number(), + substitute_client_state.latest_height().revision_height(), + ))?; self.set_subject_prefix(); client_state.check_substitute(self, substitute_client_state.clone().into())?; @@ -134,6 +140,7 @@ impl<'a, C: ClientType<'a>> Context<'a, C> { self, &self.client_id(), substitute_client_state.into(), + substitute_consensus_state.into(), )?; ContractResult::success()