Skip to content
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

feat: add flag for the private key selection #73

Merged
merged 2 commits into from
Feb 10, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion server/tm_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package server
import (
"fmt"

"github.com/cosmos/cosmos-sdk/client/flags"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit but I think we need to move this line to the below other cosmos-sdk imports.

I think it's a kind of pain point that doesn't work w/ auto formatting but we need to follow up the convention.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's right. I think so, too. I will correct this! Thank you!

"github.com/spf13/cobra"
"github.com/spf13/viper"
yaml "gopkg.in/yaml.v2"
Expand Down Expand Up @@ -145,7 +146,7 @@ func printlnJSON(v interface{}) error {

// UnsafeResetAllCmd - extension of the tendermint command, resets initialization
func UnsafeResetAllCmd(ctx *Context) *cobra.Command {
return &cobra.Command{
cmd := cobra.Command{
Use: "unsafe-reset-all",
Short: "Resets the blockchain database, removes address book files, and resets priv_validator.json to the genesis state",
RunE: func(cmd *cobra.Command, args []string) error {
Expand All @@ -155,4 +156,9 @@ func UnsafeResetAllCmd(ctx *Context) *cobra.Command {
return nil
},
}
cmd.Flags().String(flags.FlagPrivKeyType, flags.DefaultPrivKeyType, "specify validator's private key type (ed25519|composite). \n"+
"set this to priv_key.type in priv_validator_key.json; default `ed25519`")

return &cmd

}