Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "supernova", Short: "Hotstuff2 state machine replication for applications in any programming languages", PersistentPreRunE: func(cmd *cobra.Command, _ []string) (err error) { if cmd.Name() == VersionCmd.Name() { return nil } config, err = ParseConfig(cmd) if err != nil { return err } InitLogger(config) return nil }, }
RootCmd is the root command for CometBFT core.
View Source
var VersionCmd = &cobra.Command{ Use: "version", Short: "Show version info", Run: func(_ *cobra.Command, _ []string) { cmtVersion := version.CMTSemVer if version.CMTGitCommitHash != "" { cmtVersion += "+" + version.CMTGitCommitHash } if verbose { values, err := json.MarshalIndent(struct { CometBFT string `json:"cometbft"` ABCI string `json:"abci"` BlockProtocol uint64 `json:"block_protocol"` P2PProtocol uint64 `json:"p2p_protocol"` }{ CometBFT: cmtVersion, ABCI: version.ABCISemVer, BlockProtocol: version.BlockProtocol, P2PProtocol: version.P2PProtocol, }, "", " ") if err != nil { panic(fmt.Sprintf("failed to marshal version info: %v", err)) } fmt.Println(string(values)) } else { fmt.Println(cmtVersion) } }, }
VersionCmd ...
Functions ¶
func AddNodeFlags ¶
AddNodeFlags exposes some common configuration options on the command-line These are exposed for convenience of commands embedding a CometBFT node
func DefaultConfig ¶
func InitLogger ¶
func ParseConfig ¶
ParseConfig retrieves the default environment configuration, sets up the CometBFT root and ensures that the root exists.
func RunNodeCmd ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.