From 6582d8c965f8ef8e1af569c98d022401cd53e761 Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Mon, 14 Jun 2021 17:35:31 +0900 Subject: [PATCH] remove state type assertions --- .../light-clients/07-tendermint/types/client_state.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/modules/light-clients/07-tendermint/types/client_state.go b/modules/light-clients/07-tendermint/types/client_state.go index b9c9053ff6a..8695974d014 100644 --- a/modules/light-clients/07-tendermint/types/client_state.go +++ b/modules/light-clients/07-tendermint/types/client_state.go @@ -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