Skip to content

Commit

Permalink
fix downtime query flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed Dec 31, 2023
1 parent f2cfe50 commit c3bb4e8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions x/downtime/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strconv"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/lavanet/lava/x/downtime/types"
v1 "github.com/lavanet/lava/x/downtime/v1"
"github.com/spf13/cobra"
Expand All @@ -24,7 +25,7 @@ func NewQueryCmd() *cobra.Command {
}

func CmdQueryParams() *cobra.Command {
return &cobra.Command{
cmd := &cobra.Command{
Use: "params",
Short: "Query downtime module params",
RunE: func(cmd *cobra.Command, args []string) error {
Expand All @@ -40,10 +41,13 @@ func CmdQueryParams() *cobra.Command {
return clientCtx.PrintProto(resp)
},
}

flags.AddQueryFlagsToCmd(cmd)
return cmd
}

func CmdQueryDowntime() *cobra.Command {
return &cobra.Command{
cmd := &cobra.Command{
Use: "downtime [epoch_start_block]",
Short: "Query downtime",
Long: "Query downtime between blocks, if only start is provided then will query for downtime at the given block, if end is provided then it will query the full range",
Expand All @@ -67,4 +71,7 @@ func CmdQueryDowntime() *cobra.Command {
return clientCtx.PrintProto(resp)
},
}

flags.AddQueryFlagsToCmd(cmd)
return cmd
}

0 comments on commit c3bb4e8

Please sign in to comment.