Skip to content

Commit

Permalink
Merge branch 'main' into colin/1352-simparams
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-axner committed Sep 6, 2022
2 parents 24a7621 + 96b0aae commit 7985051
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import (
"time"

sdk "github.com/cosmos/cosmos-sdk/types"
sdktypes "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"

"github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"
controllertypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/controller/types"
icatypes "github.com/cosmos/ibc-go/v5/modules/apps/27-interchain-accounts/types"
clienttypes "github.com/cosmos/ibc-go/v5/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types"
Expand All @@ -18,7 +16,7 @@ import (

func (suite *KeeperTestSuite) TestRegisterAccount() {
var (
msg *controllertypes.MsgRegisterAccount
msg *types.MsgRegisterAccount
expectedChannelID = "channel-0"
)

Expand Down Expand Up @@ -70,7 +68,7 @@ func (suite *KeeperTestSuite) TestRegisterAccount() {
path := NewICAPath(suite.chainA, suite.chainB)
suite.coordinator.SetupConnections(path)

msg = controllertypes.NewMsgRegisterAccount(ibctesting.FirstConnectionID, ibctesting.TestAccAddress, "")
msg = types.NewMsgRegisterAccount(ibctesting.FirstConnectionID, ibctesting.TestAccAddress, "")

tc.malleate()

Expand All @@ -85,7 +83,7 @@ func (suite *KeeperTestSuite) TestRegisterAccount() {
events := ctx.EventManager().Events()
suite.Require().Len(events, 2)
suite.Require().Equal(events[0].Type, channeltypes.EventTypeChannelOpenInit)
suite.Require().Equal(events[1].Type, sdktypes.EventTypeMessage)
suite.Require().Equal(events[1].Type, sdk.EventTypeMessage)
} else {
suite.Require().Error(err)
suite.Require().Nil(res)
Expand All @@ -96,7 +94,7 @@ func (suite *KeeperTestSuite) TestRegisterAccount() {
func (suite *KeeperTestSuite) TestSubmitTx() {
var (
path *ibctesting.Path
msg *controllertypes.MsgSubmitTx
msg *types.MsgSubmitTx
)

testCases := []struct {
Expand Down
10 changes: 8 additions & 2 deletions modules/core/02-client/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func NewCreateClientCmd() *cobra.Command {

// NewUpdateClientCmd defines the command to update an IBC client.
func NewUpdateClientCmd() *cobra.Command {
return &cobra.Command{
cmd := &cobra.Command{
Use: "update [client-id] [path/to/client_msg.json]",
Short: "update existing client with a client message",
Long: "update existing client with a client message, for example a header, misbehaviour or batch update",
Expand Down Expand Up @@ -123,14 +123,17 @@ func NewUpdateClientCmd() *cobra.Command {
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}

flags.AddTxFlagsToCmd(cmd)
return cmd
}

// NewSubmitMisbehaviourCmd defines the command to submit a misbehaviour to prevent
// future updates.
// Deprecated: NewSubmitMisbehaviourCmd is deprecated and will be removed in a future release.
// Please use NewUpdateClientCmd instead.
func NewSubmitMisbehaviourCmd() *cobra.Command {
return &cobra.Command{
cmd := &cobra.Command{
Use: "misbehaviour [clientID] [path/to/misbehaviour.json]",
Short: "submit a client misbehaviour",
Long: "submit a client misbehaviour to prevent future updates",
Expand Down Expand Up @@ -167,6 +170,9 @@ func NewSubmitMisbehaviourCmd() *cobra.Command {
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}

flags.AddTxFlagsToCmd(cmd)
return cmd
}

// NewUpgradeClientCmd defines the command to upgrade an IBC light client.
Expand Down

0 comments on commit 7985051

Please sign in to comment.