commands

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResetAllCmd = &cobra.Command{
	Use:     "unsafe-reset-all",
	Aliases: []string{"unsafe_reset_all"},
	Short:   "(unsafe) Remove all the data and WAL, reset this beatoz's validator to genesis state",
	Run:     resetAll,
	PreRun:  deprecateSnakeCase,
}

ResetAllCmd removes the database of this Tendermint core instance.

View Source
var ResetPrivValidatorCmd = &cobra.Command{
	Use:     "unsafe-reset-priv-validator",
	Aliases: []string{"unsafe_reset_priv_validator"},
	Short:   "(unsafe) Reset this beatoz's validator to genesis state",
	Run:     resetPrivValidator,
	PreRun:  deprecateSnakeCase,
}

ResetPrivValidatorCmd resets the private validator files.

View Source
var RootCmd = &cobra.Command{
	Use:   "beatoz",
	Short: "BFT state machine replication for applications in any programming languages",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
		if cmd.Name() == VersionCmd.Name() {
			return nil
		}

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

		if rootConfig.LogFormat == tmcfg.LogFormatJSON {
			logger = tmlog.NewTMJSONLogger(tmlog.NewSyncWriter(os.Stdout))
		}

		logger, err = tmflags.ParseLogLevel(rootConfig.LogLevel, logger, tmcfg.DefaultLogLevel)
		if err != nil {
			return err
		}

		if viper.GetBool(cli.TraceFlag) {
			logger = tmlog.NewTracingLogger(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",
	Aliases: []string{"show_node_id"},
	Short:   "Show this node's ID",
	RunE:    showNodeID,
	PreRun:  deprecateSnakeCase,
}

ShowNodeIDCmd dumps node's ID to the standard output.

View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Show version info",
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(xver.String())
	},
}

VersionCmd ...

Functions

func AddInitFlags

func AddInitFlags(cmd *cobra.Command)

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 node

func AddWalletKeyCmdFlag

func AddWalletKeyCmdFlag(cmd *cobra.Command)

func InitFilesWith

func InitFilesWith(chainID string, config *cfg.Config, vcnt int, vsecret []byte, hcnt int, hsecret []byte) error

func NewInitFilesCmd

func NewInitFilesCmd() *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(nodeProvider node.Provider) *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 NewWalletKeyCmd

func NewWalletKeyCmd() *cobra.Command

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, addrBookFile, privValKeyFile, privValStateFile string, logger log.Logger)

ResetAll removes address book files plus all data, and resets the privValdiator data. 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