Skip to content

Commit

Permalink
remove channel handshake commands
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed Apr 8, 2021
1 parent c0dd7f6 commit a656432
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 302 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking

* (modules/core/03-connection) [\#109](https://github.com/cosmos/ibc-go/pull/109) Remove connection handshake CLI commands.
* (modules/core) [\#109](https://github.com/cosmos/ibc-go/pull/109) Remove connection and channel handshake CLI commands.

### State Machine Breaking

Expand Down
9 changes: 1 addition & 8 deletions modules/core/04-channel/client/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,7 @@ func NewTxCmd() *cobra.Command {
RunE: client.ValidateCmd,
}

txCmd.AddCommand(
NewChannelOpenInitCmd(),
NewChannelOpenTryCmd(),
NewChannelOpenAckCmd(),
NewChannelOpenConfirmCmd(),
NewChannelCloseInitCmd(),
NewChannelCloseConfirmCmd(),
)
txCmd.AddCommand()

return txCmd
}
288 changes: 0 additions & 288 deletions modules/core/04-channel/client/cli/tx.go

This file was deleted.

14 changes: 9 additions & 5 deletions testing/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
dbm "github.com/tendermint/tm-db"

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

Expand Down Expand Up @@ -202,6 +201,11 @@ func (s *IntegrationTestSuite) TestLegacyRestErrMessages() {
`{"@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}`,
)

badClientStateJSON := testutil.WriteToNewTempFile(
s.T(),
`{"@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}`,
)

// Write consensus json to temp file, used for an IBC message.
// Generated by printing the result of cdc.MarshalIntefaceJSON on
// a solo machine consensus state
Expand All @@ -218,18 +222,18 @@ func (s *IntegrationTestSuite) TestLegacyRestErrMessages() {
}{
{
"Failing IBC message",
ibccli.NewChannelCloseInitCmd(),
ibcclientcli.NewCreateClientCmd(),
[]string{
"121", // dummy port-id
"channel-0", // dummy channel-id
badClientStateJSON.Name(), // path to client state json
consensusJSON.Name(), // path to consensus json,
fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation),
fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock),
fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()),
fmt.Sprintf("--gas=%d", flags.DefaultGasLimit),
fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()),
fmt.Sprintf("--%s=foobar", flags.FlagMemo),
},
uint32(7),
uint32(8),
},
{
"Successful IBC message",
Expand Down

0 comments on commit a656432

Please sign in to comment.