diff --git a/modules/core/04-channel/keeper/grpc_query_test.go b/modules/core/04-channel/keeper/grpc_query_test.go index 2c20a931c9a..8dd89e1384e 100644 --- a/modules/core/04-channel/keeper/grpc_query_test.go +++ b/modules/core/04-channel/keeper/grpc_query_test.go @@ -10,7 +10,6 @@ import ( "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" "github.com/cosmos/ibc-go/v8/modules/core/exported" - ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v8/testing" "github.com/cosmos/ibc-go/v8/testing/mock" ) @@ -558,16 +557,15 @@ func (suite *KeeperTestSuite) TestQueryChannelConsensusState() { err := path.EndpointA.ChanOpenInit() suite.Require().NoError(err) - clientState := suite.chainA.GetClientState(path.EndpointA.ClientID).(*ibctm.ClientState) - expConsensusState, _ = suite.chainA.GetConsensusState(path.EndpointA.ClientID, clientState.LatestHeight) + expConsensusState, _ = suite.chainA.GetConsensusState(path.EndpointA.ClientID, path.EndpointA.GetClientLatestHeight()) suite.Require().NotNil(expConsensusState) expClientID = path.EndpointA.ClientID req = &types.QueryChannelConsensusStateRequest{ PortId: path.EndpointA.ChannelConfig.PortID, ChannelId: path.EndpointA.ChannelID, - RevisionNumber: clientState.LatestHeight.GetRevisionNumber(), - RevisionHeight: clientState.LatestHeight.GetRevisionHeight(), + RevisionNumber: path.EndpointA.GetClientLatestHeight().GetRevisionNumber(), + RevisionHeight: path.EndpointA.GetClientLatestHeight().GetRevisionHeight(), } }, true, diff --git a/modules/core/04-channel/keeper/packet_test.go b/modules/core/04-channel/keeper/packet_test.go index e291507f024..4ab703036e7 100644 --- a/modules/core/04-channel/keeper/packet_test.go +++ b/modules/core/04-channel/keeper/packet_test.go @@ -14,7 +14,6 @@ import ( commitmenttypes "github.com/cosmos/ibc-go/v8/modules/core/23-commitment/types" host "github.com/cosmos/ibc-go/v8/modules/core/24-host" "github.com/cosmos/ibc-go/v8/modules/core/exported" - smtypes "github.com/cosmos/ibc-go/v8/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint" ibctesting "github.com/cosmos/ibc-go/v8/testing" ibcmock "github.com/cosmos/ibc-go/v8/testing/mock" @@ -151,19 +150,15 @@ func (suite *KeeperTestSuite) TestSendPacket() { path.Setup() sourceChannel = path.EndpointA.ChannelID - // use client state latest height for timeout - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) - timeoutHeight = clientState.LatestHeight + timeoutHeight = path.EndpointA.GetClientLatestHeight().(clienttypes.Height) channelCap = suite.chainA.GetChannelCapability(path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID) }, false}, {"timeout timestamp passed", func() { path.Setup() sourceChannel = path.EndpointA.ChannelID - // use latest time on client state - clientState := path.EndpointA.GetClientState().(*ibctm.ClientState) connection := path.EndpointA.GetConnection() - timestamp, err := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetTimestampAtHeight(suite.chainA.GetContext(), connection.ClientId, clientState.LatestHeight) + timestamp, err := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetTimestampAtHeight(suite.chainA.GetContext(), connection.ClientId, path.EndpointA.GetClientLatestHeight()) suite.Require().NoError(err) timeoutHeight = disabledTimeoutHeight @@ -179,9 +174,8 @@ func (suite *KeeperTestSuite) TestSendPacket() { path.EndpointA.UpdateConnection(func(c *connectiontypes.ConnectionEnd) { c.ClientId = path.EndpointA.ClientID }) - clientState := path.EndpointA.GetClientState().(*smtypes.ClientState) connection := path.EndpointA.GetConnection() - timestamp, err := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetTimestampAtHeight(suite.chainA.GetContext(), connection.ClientId, clientState.GetLatestHeight()) + timestamp, err := suite.chainA.App.GetIBCKeeper().ClientKeeper.GetTimestampAtHeight(suite.chainA.GetContext(), connection.ClientId, path.EndpointA.GetClientLatestHeight()) suite.Require().NoError(err) sourceChannel = path.EndpointA.ChannelID