Skip to content

Commit 4e145d8

Browse files
authoredApr 12, 2021
remove connection and channel handshake cli commands (#109)
* remove connection handshake cli commands * add changelog entry * remove channel handshake commands * update gomod
1 parent e988386 commit 4e145d8

File tree

9 files changed

+12
-678
lines changed

9 files changed

+12
-678
lines changed
 

‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
3636

3737
## [Unreleased]
3838

39-
### API Breaking
39+
### API Breaking
4040

41+
* (modules/core) [\#109](https://github.com/cosmos/ibc-go/pull/109) Remove connection and channel handshake CLI commands.
4142
* (modules) [\#107](https://github.com/cosmos/ibc-go/pull/107) Modify OnRecvPacket callback to return an acknowledgement which indicates if it is successful or not. Callback state changes are discarded for unsuccessful acknowledgements only.
4243
* (modules) [\#108](https://github.com/cosmos/ibc-go/pull/108) All message constructors take the signer as a string to prevent upstream bugs. The `String()` function for an SDK Acc Address relies on external context.
4344

‎go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ require (
1616
github.com/rakyll/statik v0.1.7
1717
github.com/spf13/cast v1.3.1
1818
github.com/spf13/cobra v1.1.3
19-
github.com/spf13/pflag v1.0.5
2019
github.com/spf13/viper v1.7.1
2120
github.com/stretchr/testify v1.7.0
2221
github.com/tendermint/tendermint v0.34.8

‎modules/core/03-connection/client/cli/cli.go

-21
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package cli
33
import (
44
"github.com/spf13/cobra"
55

6-
"github.com/cosmos/cosmos-sdk/client"
76
"github.com/cosmos/ibc-go/modules/core/03-connection/types"
87
)
98

@@ -24,23 +23,3 @@ func GetQueryCmd() *cobra.Command {
2423

2524
return queryCmd
2625
}
27-
28-
// NewTxCmd returns a CLI command handler for all x/ibc connection transaction commands.
29-
func NewTxCmd() *cobra.Command {
30-
txCmd := &cobra.Command{
31-
Use: types.SubModuleName,
32-
Short: "IBC connection transaction subcommands",
33-
DisableFlagParsing: true,
34-
SuggestionsMinimumDistance: 2,
35-
RunE: client.ValidateCmd,
36-
}
37-
38-
txCmd.AddCommand(
39-
NewConnectionOpenInitCmd(),
40-
NewConnectionOpenTryCmd(),
41-
NewConnectionOpenAckCmd(),
42-
NewConnectionOpenConfirmCmd(),
43-
)
44-
45-
return txCmd
46-
}

‎modules/core/03-connection/client/cli/tx.go

-348
This file was deleted.

‎modules/core/03-connection/module.go

-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ func Name() string {
1313
return types.SubModuleName
1414
}
1515

16-
// GetTxCmd returns the root tx command for the IBC connections.
17-
func GetTxCmd() *cobra.Command {
18-
return cli.NewTxCmd()
19-
}
20-
2116
// GetQueryCmd returns the root query command for the IBC connections.
2217
func GetQueryCmd() *cobra.Command {
2318
return cli.GetQueryCmd()

‎modules/core/04-channel/client/cli/cli.go

+1-8
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,7 @@ func NewTxCmd() *cobra.Command {
4545
RunE: client.ValidateCmd,
4646
}
4747

48-
txCmd.AddCommand(
49-
NewChannelOpenInitCmd(),
50-
NewChannelOpenTryCmd(),
51-
NewChannelOpenAckCmd(),
52-
NewChannelOpenConfirmCmd(),
53-
NewChannelCloseInitCmd(),
54-
NewChannelCloseConfirmCmd(),
55-
)
48+
txCmd.AddCommand()
5649

5750
return txCmd
5851
}

‎modules/core/04-channel/client/cli/tx.go

-288
This file was deleted.

‎modules/core/client/cli/cli.go

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ func GetTxCmd() *cobra.Command {
2222

2323
ibcTxCmd.AddCommand(
2424
ibcclient.GetTxCmd(),
25-
connection.GetTxCmd(),
2625
channel.GetTxCmd(),
2726
)
2827

‎testing/sdk_test.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
dbm "github.com/tendermint/tm-db"
3030

3131
ibcclientcli "github.com/cosmos/ibc-go/modules/core/02-client/client/cli"
32-
ibccli "github.com/cosmos/ibc-go/modules/core/04-channel/client/cli"
3332
"github.com/cosmos/ibc-go/testing/simapp"
3433
)
3534

@@ -202,6 +201,11 @@ func (s *IntegrationTestSuite) TestLegacyRestErrMessages() {
202201
`{"@type":"/ibc.lightclients.solomachine.v1.ClientState","sequence":"1","frozen_sequence":"0","consensus_state":{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtK50+5pJOoaa04qqAqrnyAqsYrwrR/INnA6UPIaYZlp"},"diversifier":"testing","timestamp":"10"},"allow_update_after_proposal":false}`,
203202
)
204203

204+
badClientStateJSON := testutil.WriteToNewTempFile(
205+
s.T(),
206+
`{"@type":"/ibc.lightclients.solomachine.v1.ClientState","sequence":"1","frozen_sequence":"0","consensus_state":{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtK50+5pJOoaa04qqAqrnyAqsYrwrR/INnA6UPIaYZlp"},"diversifier":"DIFFERENT","timestamp":"10"},"allow_update_after_proposal":false}`,
207+
)
208+
205209
// Write consensus json to temp file, used for an IBC message.
206210
// Generated by printing the result of cdc.MarshalIntefaceJSON on
207211
// a solo machine consensus state
@@ -218,18 +222,18 @@ func (s *IntegrationTestSuite) TestLegacyRestErrMessages() {
218222
}{
219223
{
220224
"Failing IBC message",
221-
ibccli.NewChannelCloseInitCmd(),
225+
ibcclientcli.NewCreateClientCmd(),
222226
[]string{
223-
"121", // dummy port-id
224-
"channel-0", // dummy channel-id
227+
badClientStateJSON.Name(), // path to client state json
228+
consensusJSON.Name(), // path to consensus json,
225229
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
226230
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
227231
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
228232
fmt.Sprintf("--gas=%d", flags.DefaultGasLimit),
229233
fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()),
230234
fmt.Sprintf("--%s=foobar", flags.FlagMemo),
231235
},
232-
uint32(7),
236+
uint32(8),
233237
},
234238
{
235239
"Successful IBC message",

0 commit comments

Comments
 (0)
Please sign in to comment.