Skip to content

Commit

Permalink
Fix ibc client (#8341)
Browse files Browse the repository at this point in the history
* fix-ibc-client

* add changelog
  • Loading branch information
SegueII authored Jan 18, 2021
1 parent afda621 commit 411b04d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes

* (x/auth) [\#8287](https://github.com/cosmos/cosmos-sdk/pull/8287) Fix `tx sign --signature-only` to return correct sequence value in signature.
* (x/ibc) [\#8341](https://github.com/cosmos/cosmos-sdk/pull/8341) Fix query latest consensus state.

## [v0.40.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.40.0) - 2021-01-08

Expand Down
9 changes: 5 additions & 4 deletions x/ibc/core/04-channel/client/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ func QueryLatestConsensusState(
if err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}
clientState, err := clienttypes.UnpackClientState(clientRes.IdentifiedClientState.ClientState)
if err != nil {

var clientState exported.ClientState
if err := clientCtx.InterfaceRegistry.UnpackAny(clientRes.IdentifiedClientState.ClientState, &clientState); err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

Expand All @@ -148,8 +149,8 @@ func QueryLatestConsensusState(
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

consensusState, err := clienttypes.UnpackConsensusState(res.ConsensusState)
if err != nil {
var consensusState exported.ConsensusState
if err := clientCtx.InterfaceRegistry.UnpackAny(res.ConsensusState, &consensusState); err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

Expand Down

0 comments on commit 411b04d

Please sign in to comment.