Documentation ¶
Index ¶
- Constants
- Variables
- func AddDaemonFlags(cmd *cobra.Command)
- func AddNodeFlags(cmd *cobra.Command)
- func AddStartCommand(cmd *cobra.Command, daemonProvider *daemon.BaseProvider)
- func DoCmd(daemonProvider *daemon.BaseProvider)
- func InitRootCommand() *cobra.Command
- func NewInitCmd() *cobra.Command
- func NewStartCmd(nodeProvider tm.Provider, daemonProvider daemon.Provider) *cobra.Command
- func ParseConfig() (*cfg.Config, error)
- func ResetAll(dbDir, addrBookFile, privValKeyFile, privValStateFile string, ...)
Constants ¶
const (
DefaultBCDir = "chainroot"
)
Variables ¶
var ResetAllCmd = &cobra.Command{
Use: "unsafe_reset_all",
Short: "(unsafe) Remove all the data and WAL, reset this node's validator to genesis state",
Run: resetAll,
}
ResetAllCmd removes the database of this Tendermint core instance.
var ResetPrivValidatorCmd = &cobra.Command{
Use: "unsafe_reset_priv_validator",
Short: "(unsafe) Reset this node's validator to genesis state",
Run: resetPrivValidator,
}
ResetPrivValidatorCmd resets the private validator files.
var RootCmd = &cobra.Command{ Use: "bcb", Short: "Brige-Chain on Tendermint Core (BFT Consensus)", PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) { if cmd.Name() == VersionCmd.Name() { return nil } config, err = ParseConfig() if err != nil { return err } if config.LogFormat == cfg.LogFormatJSON { logger = log.NewTMJSONLogger(log.NewSyncWriter(os.Stdout)) } logger, err = tmflags.ParseLogLevel(config.LogLevel, logger, cfg.DefaultLogLevel()) if err != nil { return err } if viper.GetBool(cli.TraceFlag) { logger = log.NewTracingLogger(logger) } logger = logger.With("module", "main") return nil }, }
RootCmd is the root command for Tendermint core.
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.
var ShowValidatorCmd = &cobra.Command{
Use: "show_validator",
Short: "Show this node's validator info",
RunE: showValidator,
}
ShowValidatorCmd adds capabilities for showing the validator info.
var VersionCmd = &cobra.Command{ Use: "version", Short: "Show version info", Run: func(cmd *cobra.Command, args []string) { fmt.Println(version.Version) }, }
VersionCmd ...
Functions ¶
func AddDaemonFlags ¶
AddNodeFlags exposes some common configuration options on the command-line These are exposed for convenience of commands embedding a tendermint node
func AddNodeFlags ¶
AddNodeFlags exposes some common configuration options on the command-line These are exposed for convenience of commands embedding a tendermint node
func AddStartCommand ¶
func AddStartCommand(cmd *cobra.Command, daemonProvider *daemon.BaseProvider)
func DoCmd ¶
func DoCmd(daemonProvider *daemon.BaseProvider)
func InitRootCommand ¶
func NewInitCmd ¶
func NewStartCmd ¶
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 ¶
ParseConfig retrieves the default environment configuration, sets up the Tendermint root and ensures that the root exists
Types ¶
This section is empty.