Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with the error variant of new_check_header_and_update method #406

Merged
merged 2 commits into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Fix issue with the error handling in the `new_check_header_and_update_state`
method when consensus state is not found
([#405](https://github.com/cosmos/ibc-rs/issues/405))
8 changes: 7 additions & 1 deletion crates/ibc/src/clients/ics07_tendermint/client_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -692,8 +692,14 @@ impl Ics2ClientState for ClientState {
match ctx.consensus_state(client_id, &height) {
Ok(cs) => Ok(Some(cs)),
Err(e) => match e {
ContextError::ClientError(ClientError::ConsensusStateNotFound {
client_id: _,
height: _,
}) => Ok(None),
ContextError::ClientError(e) => Err(e),
_ => Ok(None),
_ => Err(ClientError::Other {
description: e.to_string(),
}),
},
}
}
Expand Down