small fixes

This commit is contained in:
Jeremiah Andrews 2018-05-31 18:38:15 -07:00
parent a032386e87
commit 744f78573e
3 changed files with 27 additions and 24 deletions

View File

@ -18,7 +18,7 @@ import (
func ValidatorCommand() *cobra.Command { func ValidatorCommand() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "validatorset [height]", Use: "validatorset [height]",
Short: "Get the full validator set at given height", Short: "Get the full tendermint validator set at given height",
Args: cobra.MaximumNArgs(1), Args: cobra.MaximumNArgs(1),
RunE: printValidators, RunE: printValidators,
} }

View File

@ -37,7 +37,6 @@ func main() {
// add standard rpc commands // add standard rpc commands
rpc.AddCommands(rootCmd) rpc.AddCommands(rootCmd)
rootCmd.AddCommand(client.LineBreak)
//Add state commands //Add state commands
stateCmd := &cobra.Command{ stateCmd := &cobra.Command{
@ -49,8 +48,30 @@ func main() {
rpc.ValidatorCommand(), rpc.ValidatorCommand(),
) )
tx.AddCommands(stateCmd, cdc) tx.AddCommands(stateCmd, cdc)
rootCmd.AddCommand(
//Add IBC commands
ibcCmd := &cobra.Command{
Use: "ibc",
Short: "Inter-Blockchain Communication subcommands",
}
ibcCmd.AddCommand(
client.PostCommands(
ibccmd.IBCTransferCmd(cdc),
ibccmd.IBCRelayCmd(cdc),
)...)
advancedCmd := &cobra.Command{
Use: "advanced",
Short: "Advanced subcommands",
}
advancedCmd.AddCommand(
stateCmd, stateCmd,
ibcCmd,
lcd.ServeCommand(cdc),
)
rootCmd.AddCommand(
advancedCmd,
client.LineBreak, client.LineBreak,
) )
@ -75,22 +96,6 @@ func main() {
)...) )...)
rootCmd.AddCommand( rootCmd.AddCommand(
stakeCmd, stakeCmd,
client.LineBreak,
)
//Add IBC commands
ibcCmd := &cobra.Command{
Use: "ibc",
Short: "Inter-Blockchain Communication subcommands",
}
ibcCmd.AddCommand(
client.PostCommands(
ibccmd.IBCTransferCmd(cdc),
ibccmd.IBCRelayCmd(cdc),
)...)
rootCmd.AddCommand(
ibcCmd,
client.LineBreak,
) )
//Add auth and bank commands //Add auth and bank commands
@ -105,8 +110,6 @@ func main() {
// add proxy, version and key info // add proxy, version and key info
rootCmd.AddCommand( rootCmd.AddCommand(
client.LineBreak,
lcd.ServeCommand(cdc),
keys.Commands(), keys.Commands(),
client.LineBreak, client.LineBreak,
version.VersionCmd, version.VersionCmd,

View File

@ -73,12 +73,12 @@ func AddCommands(
rootCmd.PersistentFlags().String("log_level", ctx.Config.LogLevel, "Log level") rootCmd.PersistentFlags().String("log_level", ctx.Config.LogLevel, "Log level")
tendCmd := &cobra.Command{ tendermintCmd := &cobra.Command{
Use: "tendermint", Use: "tendermint",
Short: "Tendermint subcommands", Short: "Tendermint subcommands",
} }
tendCmd.AddCommand( tendermintCmd.AddCommand(
UnsafeResetAllCmd(ctx), UnsafeResetAllCmd(ctx),
ShowNodeIDCmd(ctx), ShowNodeIDCmd(ctx),
ShowValidatorCmd(ctx), ShowValidatorCmd(ctx),
@ -88,7 +88,7 @@ func AddCommands(
InitCmd(ctx, cdc, appInit), InitCmd(ctx, cdc, appInit),
StartCmd(ctx, appCreator), StartCmd(ctx, appCreator),
client.LineBreak, client.LineBreak,
tendCmd, tendermintCmd,
client.LineBreak, client.LineBreak,
ExportCmd(ctx, cdc, appExport), ExportCmd(ctx, cdc, appExport),
client.LineBreak, client.LineBreak,