commands

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "tendermint",
	Short: "Tendermint Core (BFT Consensus) in Go",
	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)
		}
		return nil
	},
}

Functions

func AddNodeFlags

func AddNodeFlags(cmd *cobra.Command)

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

func ParseConfig

func ParseConfig() (*cfg.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)

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