From 75ceafe354f7f9b969ad22d5cc88db3f4923d55c Mon Sep 17 00:00:00 2001 From: Jorge Hernandez <3452489+jhernandezb@users.noreply.github.com> Date: Tue, 6 Sep 2022 05:30:02 -0600 Subject: [PATCH 1/2] fix: missing tx flags for update and misbehaviour commands in client (#2171) (cherry picked from commit 4adc069ff2e5536c91bd970ec46196c5cf292bf9) # Conflicts: # modules/core/02-client/client/cli/tx.go --- modules/core/02-client/client/cli/tx.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/core/02-client/client/cli/tx.go b/modules/core/02-client/client/cli/tx.go index 71d50f90dae..3c25bc877c6 100644 --- a/modules/core/02-client/client/cli/tx.go +++ b/modules/core/02-client/client/cli/tx.go @@ -85,11 +85,19 @@ func NewCreateClientCmd() *cobra.Command { // NewUpdateClientCmd defines the command to update an IBC client. func NewUpdateClientCmd() *cobra.Command { +<<<<<<< HEAD return &cobra.Command{ Use: "update [client-id] [path/to/header.json]", Short: "update existing client with a header", Long: "update existing client with a header", Example: fmt.Sprintf("%s tx ibc %s update [client-id] [path/to/header.json] --from node0 --home ../node0/cli --chain-id $CID", version.AppName, types.SubModuleName), +======= + 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", + Example: fmt.Sprintf("%s tx ibc %s update [client-id] [path/to/client_msg.json] --from node0 --home ../node0/cli --chain-id $CID", version.AppName, types.SubModuleName), +>>>>>>> 4adc069 (fix: missing tx flags for update and misbehaviour commands in client (#2171)) Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) @@ -123,13 +131,21 @@ 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. func NewSubmitMisbehaviourCmd() *cobra.Command { +<<<<<<< HEAD return &cobra.Command{ Use: "misbehaviour [path/to/misbehaviour.json]", +======= + cmd := &cobra.Command{ + Use: "misbehaviour [clientID] [path/to/misbehaviour.json]", +>>>>>>> 4adc069 (fix: missing tx flags for update and misbehaviour commands in client (#2171)) Short: "submit a client misbehaviour", Long: "submit a client misbehaviour to prevent future updates", Example: fmt.Sprintf("%s tx ibc %s misbehaviour [path/to/misbehaviour.json] --from node0 --home ../node0/cli --chain-id $CID", version.AppName, types.SubModuleName), @@ -164,6 +180,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. From c1820f6dbcfea4f920637211595195b509282f37 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Wed, 7 Sep 2022 11:36:15 +0200 Subject: [PATCH 2/2] fix conflicts --- modules/core/02-client/client/cli/tx.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/modules/core/02-client/client/cli/tx.go b/modules/core/02-client/client/cli/tx.go index 3c25bc877c6..d4de241fcb5 100644 --- a/modules/core/02-client/client/cli/tx.go +++ b/modules/core/02-client/client/cli/tx.go @@ -85,19 +85,11 @@ func NewCreateClientCmd() *cobra.Command { // NewUpdateClientCmd defines the command to update an IBC client. func NewUpdateClientCmd() *cobra.Command { -<<<<<<< HEAD - return &cobra.Command{ + cmd := &cobra.Command{ Use: "update [client-id] [path/to/header.json]", Short: "update existing client with a header", Long: "update existing client with a header", Example: fmt.Sprintf("%s tx ibc %s update [client-id] [path/to/header.json] --from node0 --home ../node0/cli --chain-id $CID", version.AppName, types.SubModuleName), -======= - 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", - Example: fmt.Sprintf("%s tx ibc %s update [client-id] [path/to/client_msg.json] --from node0 --home ../node0/cli --chain-id $CID", version.AppName, types.SubModuleName), ->>>>>>> 4adc069 (fix: missing tx flags for update and misbehaviour commands in client (#2171)) Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) @@ -139,13 +131,8 @@ func NewUpdateClientCmd() *cobra.Command { // NewSubmitMisbehaviourCmd defines the command to submit a misbehaviour to prevent // future updates. func NewSubmitMisbehaviourCmd() *cobra.Command { -<<<<<<< HEAD - return &cobra.Command{ - Use: "misbehaviour [path/to/misbehaviour.json]", -======= cmd := &cobra.Command{ - Use: "misbehaviour [clientID] [path/to/misbehaviour.json]", ->>>>>>> 4adc069 (fix: missing tx flags for update and misbehaviour commands in client (#2171)) + Use: "misbehaviour [path/to/misbehaviour.json]", Short: "submit a client misbehaviour", Long: "submit a client misbehaviour to prevent future updates", Example: fmt.Sprintf("%s tx ibc %s misbehaviour [path/to/misbehaviour.json] --from node0 --home ../node0/cli --chain-id $CID", version.AppName, types.SubModuleName),