diff --git a/x/ccv/provider/client/cli/query.go b/x/ccv/provider/client/cli/query.go index 54cccf7fac..80746ff5d2 100644 --- a/x/ccv/provider/client/cli/query.go +++ b/x/ccv/provider/client/cli/query.go @@ -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 @@ -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", diff --git a/x/ccv/provider/keeper/grpc_query.go b/x/ccv/provider/keeper/grpc_query.go index e74fea7a3b..881a6b1a98 100644 --- a/x/ccv/provider/keeper/grpc_query.go +++ b/x/ccv/provider/keeper/grpc_query.go @@ -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")