From 6374d66ba28f0355b0522d52b37af5c75e513622 Mon Sep 17 00:00:00 2001 From: wllmshao Date: Thu, 6 Feb 2025 17:00:06 -0500 Subject: [PATCH] Address todos --- tests/integration/changeover.go | 2 +- tests/integration/distribution.go | 1 - x/ccv/consumer/ibc_module.go | 2 +- x/ccv/consumer/ibc_module_test.go | 2 +- x/ccv/consumer/keeper/genesis.go | 2 +- x/ccv/provider/keeper/consumer_lifecycle.go | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/integration/changeover.go b/tests/integration/changeover.go index 8502c97f66..47f2cb1bd7 100644 --- a/tests/integration/changeover.go +++ b/tests/integration/changeover.go @@ -27,7 +27,7 @@ func (suite *CCVTestSuite) TestRecycleTransferChannel() { // Create transfer channel manually distrTransferMsg := channeltypes.NewMsgChannelOpenInit( transfertypes.PortID, - transfertypes.V1, // TODO(wllmshao): check if this is correct + transfertypes.V1, channeltypes.UNORDERED, []string{suite.path.EndpointA.ConnectionID}, transfertypes.PortID, diff --git a/tests/integration/distribution.go b/tests/integration/distribution.go index 175c1b61ae..c96bb1f46f 100644 --- a/tests/integration/distribution.go +++ b/tests/integration/distribution.go @@ -690,7 +690,6 @@ func (s *CCVTestSuite) TestIBCTransferMiddleware() { s.Require().NoError(err) // execute middleware OnRecvPacket logic - // TODO(wllmshao): check if this version string is ok ack := cbs.OnRecvPacket(s.providerCtx(), transfertypes.V1, packet, sdk.AccAddress{}) // compute expected rewards with provider denom diff --git a/x/ccv/consumer/ibc_module.go b/x/ccv/consumer/ibc_module.go index ffba4062ba..1eaa363b48 100644 --- a/x/ccv/consumer/ibc_module.go +++ b/x/ccv/consumer/ibc_module.go @@ -162,7 +162,7 @@ func (am AppModule) OnChanOpenAck( distrTransferMsg := channeltypes.NewMsgChannelOpenInit( transfertypes.PortID, - transfertypes.V1, // TODO(wllmshao): check if this is correct + transfertypes.V1, channeltypes.UNORDERED, connHops, transfertypes.PortID, diff --git a/x/ccv/consumer/ibc_module_test.go b/x/ccv/consumer/ibc_module_test.go index 5ca229dcec..49dc37b3fa 100644 --- a/x/ccv/consumer/ibc_module_test.go +++ b/x/ccv/consumer/ibc_module_test.go @@ -220,7 +220,7 @@ func TestOnChanOpenAck(t *testing.T) { // Expected msg distrTransferMsg := channeltypes.NewMsgChannelOpenInit( transfertypes.PortID, - transfertypes.V1, // TODO(wllmshao): check if this is correct + transfertypes.V1, channeltypes.UNORDERED, []string{"connectionID"}, transfertypes.PortID, diff --git a/x/ccv/consumer/keeper/genesis.go b/x/ccv/consumer/keeper/genesis.go index 6e9b047c63..989b7df911 100644 --- a/x/ccv/consumer/keeper/genesis.go +++ b/x/ccv/consumer/keeper/genesis.go @@ -71,7 +71,7 @@ func (k Keeper) InitGenesis(ctx sdk.Context, state *types.GenesisState) []abci.V panic(err) } - // TODO(wllmshao): this forces the client to be tendermint, unsure if this is ok + // this means the client must be tendermint cid, err := k.clientKeeper.CreateClient(ctx, ibchost.Tendermint, clientStateBytes, consensusStateBytes) if err != nil { // If the client creation fails, the chain MUST NOT start diff --git a/x/ccv/provider/keeper/consumer_lifecycle.go b/x/ccv/provider/keeper/consumer_lifecycle.go index 8b8c175ebc..46074e1b06 100644 --- a/x/ccv/provider/keeper/consumer_lifecycle.go +++ b/x/ccv/provider/keeper/consumer_lifecycle.go @@ -343,7 +343,7 @@ func (k Keeper) CreateConsumerClient( return err } - // TODO(wllmshao): this forces the client to be tendermint, unsure if this is ok + // this means the client must be tendermint clientID, err := k.clientKeeper.CreateClient(ctx, ibchost.Tendermint, clientStateBytes, consensusStateBytes) if err != nil { return err