-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packetserver: Rename Counterparty to Channel #7429
Changes from all commits
d206c5b
49b0b65
0a74710
485f782
dc3aeff
5bb56a7
c20a460
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,12 +13,12 @@ import ( | |
"github.com/cosmos/ibc-go/v9/modules/core/packet-server/types" | ||
) | ||
|
||
// getCmdQueryClient defines the command to query the client information (creator and counterparty) for the given client ID. | ||
func getCmdQueryClient() *cobra.Command { | ||
// getCmdQueryChannel defines the command to query the client information (creator and channel) for the given client ID. | ||
func getCmdQueryChannel() *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "client [client-id]", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will need to update these also within v2. I don't think there's any point in refactoring them in packet-server as it will eventually be removed, right? happy to create an issue for CLI's and queries in v2 pkg. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should be able to move the whole folder at some point and do some tweaks. Think these can be moved along with the move of the types in channel/v2? |
||
Short: "Query the information of a client.", | ||
Long: "Query the client information (creator and counterparty) for the provided client ID.", | ||
Long: "Query the client information (creator and channel) for the provided client ID.", | ||
Example: fmt.Sprintf("%s query %s %s client [client-id]", version.AppName, exported.ModuleName, types.SubModuleName), | ||
Args: cobra.ExactArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
|
@@ -28,11 +28,11 @@ func getCmdQueryClient() *cobra.Command { | |
} | ||
clientID := args[0] | ||
|
||
queryClient := types.NewQueryClient(clientCtx) | ||
queryChannel := types.NewQueryClient(clientCtx) | ||
|
||
req := &types.QueryClientRequest{ClientId: clientID} | ||
req := &types.QueryChannelRequest{ChannelId: clientID} | ||
|
||
res, err := queryClient.Client(cmd.Context(), req) | ||
res, err := queryChannel.Channel(cmd.Context(), req) | ||
if err != nil { | ||
return err | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably remove this from classic at some point later and have it fully in the v2 pkg/codepath.