cmd

package
v0.0.0-...-63f9e25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenNodeKeyCmd = &cobra.Command{
	Use:   "gen_node_key",
	Short: "Generate a node key for this node and print its ID",
	RunE:  genNodeKey,
}

GenNodeKeyCmd allows the generation of a node key. It prints node's ID to the standard output.

View Source
var GenValidatorCmd = &cobra.Command{
	Use:   "gen_validator",
	Short: "Generate new validator keypair",
	Run:   genValidator,
}

GenValidatorCmd allows the generation of a keypair for a validator.

View Source
var InitFilesCmd = &cobra.Command{
	Use:   "init",
	Short: "Initialize Tendermint",
	RunE:  initFiles,
}

InitFilesCmd initialises a fresh Tendermint Core instance.

View Source
var LiteCmd = &cobra.Command{
	Use:   "lite",
	Short: "Run lite-client proxy server, verifying tendermint rpc",
	Long: `This node will run a secure proxy to a tendermint rpc server.

All calls that can be tracked back to a block header by a proof
will be verified before passing them back to the caller. Other that
that it will present the same interface as a full tendermint node,
just with added trust and running locally.`,
	RunE:         runProxy,
	SilenceUsage: true,
}

LiteCmd represents the base command when called without any subcommands

View Source
var ProbeUpnpCmd = &cobra.Command{
	Use:   "probe_upnp",
	Short: "Test UPnP functionality",
	RunE:  probeUpnp,
}

ProbeUpnpCmd adds capabilities to test the UPnP functionality.

View Source
var ReplayCmd = &cobra.Command{
	Use:   "replay",
	Short: "Replay messages from WAL",
	Run: func(cmd *cobra.Command, args []string) {
		consensus.RunReplayFile(config.BaseConfig, config.Consensus, false)
	},
}

ReplayCmd allows replaying of messages from the WAL.

View Source
var ReplayConsoleCmd = &cobra.Command{
	Use:   "replay_console",
	Short: "Replay messages from WAL in a console",
	Run: func(cmd *cobra.Command, args []string) {
		consensus.RunReplayFile(config.BaseConfig, config.Consensus, true)
	},
}

ReplayConsoleCmd allows replaying of messages from the WAL in a console.

View Source
var ResetAllCmd = &cobra.Command{
	Use:   "unsafe_reset_all",
	Short: "(unsafe) Remove all the data and WAL, reset this node's validator",
	Run:   resetAll,
}

ResetAllCmd removes the database of this Tendermint core instance.

View Source
var ResetPrivValidatorCmd = &cobra.Command{
	Use:   "unsafe_reset_priv_validator",
	Short: "(unsafe) Reset this node's validator",
	Run:   resetPrivValidator,
}

ResetPrivValidatorCmd resets the private validator files.

View Source
var RootCmd = &cobra.Command{
	Use:   "mint",
	Short: "mint core",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {

		if cmd.Name() == VersionCmd.Name() {
			return nil
		}

		config, err = ParseConfig()
		if err != nil {
			return err
		}

		logger, err = tmflags.ParseLogLevel(config.LogLevel, logger, cfg.DefaultLogLevel())
		if err != nil {
			return err
		}
		if viper.GetBool(cli.TraceFlag) {
			logger = log.NewTracingLogger(logger)
		}

		k.SetLog(logger)

		logger = logger.With("module", "main")
		return nil
	},
}

RootCmd is the root command for Tendermint core.

View Source
var ShowNodeIDCmd = &cobra.Command{
	Use:   "show_node_id",
	Short: "Show this node's ID",
	RunE:  showNodeID,
}

ShowNodeIDCmd dumps node's ID to the standard output.

View Source
var ShowValidatorCmd = &cobra.Command{
	Use:   "show_validator",
	Short: "Show this node's validator info",
	Run:   showValidator,
}

ShowValidatorCmd adds capabilities for showing the validator info.

View Source
var TestnetFilesCmd = &cobra.Command{
	Use:   "testnet",
	Short: "Initialize files for a Tendermint testnet",
	RunE:  testnetFiles,
}

TestnetFilesCmd allows initialisation of files for a Tendermint testnet.

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Show version info",
	Run: func(cmd *cobra.Command, args []string) {
		logger.Info("tendermint version", "version", version.Version)
		logger.Info("usmint version", "version", uv.Version)
		logger.Info("usmint commit version", "version", uv.GitCommit)
		logger.Info("usmint build version", "version", uv.BuildVersion)
	},
}

VersionCmd ...

Functions

func AddNodeFlags

func AddNodeFlags(cmd *cobra.Command) *cobra.Command

AddNodeFlags exposes some common configuration options on the command-line These are exposed for convenience of commands embedding a tendermint node

func BuildFlags

func BuildFlags(cmd *cobra.Command) *cobra.Command

func DockerOptFlags

func DockerOptFlags(cmd *cobra.Command) *cobra.Command

func NewBuildCmd

func NewBuildCmd() *cobra.Command

NewRunNodeCmd returns the command that allows the CLI to start a node. It can be used with a custom PrivValidator and in-process ABCI application.

func NewDockerOptCmd

func NewDockerOptCmd() *cobra.Command

NewRunNodeCmd returns the command that allows the CLI to start a node. It can be used with a custom PrivValidator and in-process ABCI application.

func NewRunNodeCmd

func NewRunNodeCmd() *cobra.Command

NewRunNodeCmd returns the command that allows the CLI to start a node. It can be used with a custom PrivValidator and in-process ABCI application.

func ParseConfig

func ParseConfig() (*k.Config, error)

ParseConfig retrieves the default environment configuration, sets up the Tendermint root and ensures that the root exists

func ResetAll

func ResetAll(dbDir, privValFile string, logger log.Logger)

ResetAll removes the privValidator files. Exported so other CLI tools can use it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL