Skip to content

Commit

Permalink
whoopsies forgot to rm some boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Sep 14, 2023
1 parent e228953 commit 7d3dd64
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
36 changes: 0 additions & 36 deletions x/ccv/provider/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func NewQueryCmd() *cobra.Command {
cmd.AddCommand(CmdConsumerValidatorKeyAssignment())
cmd.AddCommand(CmdProviderValidatorKey())
cmd.AddCommand(CmdThrottleState())
cmd.AddCommand(CmdThrottledConsumerPacketData())
cmd.AddCommand(CmdRegisteredConsumerRewardDenoms())

return cmd
Expand Down Expand Up @@ -286,41 +285,6 @@ $ %s query provider throttle-state
return cmd
}

func CmdThrottledConsumerPacketData() *cobra.Command {
cmd := &cobra.Command{
Use: "throttled-consumer-packet-data [chainid]",
Short: "[DEPRECATED] Returns an empty set.",
Long: strings.TrimSpace(
fmt.Sprintf(`[DEPRECATED] Returns an empty set.
Example:
$ %s query provider throttled-consumer-packet-data foochain
`,
version.AppName,
),
),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)

req := &types.QueryThrottledConsumerPacketDataRequest{ChainId: args[0]}
res, err := queryClient.QueryThrottledConsumerPacketData(cmd.Context(), req)
if err != nil {
return err
}

return clientCtx.PrintProto(res)
},
}

flags.AddQueryFlagsToCmd(cmd)

return cmd
}

func CmdRegisteredConsumerRewardDenoms() *cobra.Command {
cmd := &cobra.Command{
Use: "registered-consumer-reward-denoms",
Expand Down
23 changes: 0 additions & 23 deletions x/ccv/provider/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,29 +155,6 @@ func (k Keeper) QueryThrottleState(goCtx context.Context, req *types.QueryThrott
}, nil
}

func (k Keeper) QueryThrottledConsumerPacketData(goCtx context.Context, req *types.QueryThrottledConsumerPacketDataRequest) (*types.QueryThrottledConsumerPacketDataResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
}

if req.ChainId == "" {
return nil, status.Error(codes.InvalidArgument, "invalid chain-id")
}

ctx := sdk.UnwrapSDKContext(goCtx)
if _, found := k.GetChainToChannel(ctx, req.ChainId); !found {
return nil, status.Error(codes.InvalidArgument, "invalid chain-id")
}

packetDataInstances := []types.ThrottledPacketDataWrapper{}

return &types.QueryThrottledConsumerPacketDataResponse{
ChainId: req.ChainId,
Size_: 0,
PacketDataInstances: packetDataInstances,
}, nil
}

func (k Keeper) QueryRegisteredConsumerRewardDenoms(goCtx context.Context, req *types.QueryRegisteredConsumerRewardDenomsRequest) (*types.QueryRegisteredConsumerRewardDenomsResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "empty request")
Expand Down

0 comments on commit 7d3dd64

Please sign in to comment.