You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
519 B

package commands
import (
"fmt"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/config"
)
// MakeShowNodeIDCommand constructs a command to dump the node ID to stdout.
func MakeShowNodeIDCommand(conf *config.Config) *cobra.Command {
return &cobra.Command{
Use: "show-node-id",
Short: "Show this node's ID",
RunE: func(cmd *cobra.Command, args []string) error {
nodeKeyID, err := conf.LoadNodeKeyID()
if err != nil {
return err
}
fmt.Println(nodeKeyID)
return nil
},
}
}