Skip to content

Commit

Permalink
remove state type assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
bluele committed Jun 23, 2021
1 parent 27f20ab commit 6582d8c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions modules/light-clients/07-tendermint/types/client_state.go
Original file line number Diff line number Diff line change
@@ -208,11 +208,6 @@ func (cs ClientState) VerifyClientState(
return sdkerrors.Wrap(clienttypes.ErrInvalidClient, "client state cannot be empty")
}

_, ok := clientState.(*ClientState)
if !ok {
return sdkerrors.Wrapf(clienttypes.ErrInvalidClient, "invalid client type %T, expected %T", clientState, &ClientState{})
}

bz, err := cdc.MarshalInterface(clientState)
if err != nil {
return err
@@ -248,11 +243,6 @@ func (cs ClientState) VerifyClientConsensusState(
return sdkerrors.Wrap(clienttypes.ErrInvalidConsensus, "consensus state cannot be empty")
}

_, ok := consensusState.(*ConsensusState)
if !ok {
return sdkerrors.Wrapf(clienttypes.ErrInvalidConsensus, "invalid consensus type %T, expected %T", consensusState, &ConsensusState{})
}

bz, err := cdc.MarshalInterface(consensusState)
if err != nil {
return err

0 comments on commit 6582d8c

Please sign in to comment.