cmd

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 41 Imported by: 0

Documentation

Overview

Package cmd provides the cli for running the halo consensus client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCometConfig

func DefaultCometConfig(homeDir string) cfg.Config

DefaultCometConfig returns the default cometBFT config.

func InitFiles

func InitFiles(ctx context.Context, initCfg InitConfig) error

InitFiles initializes the files and folders required by halo. It ensures a network and genesis file is generated/downloaded for the provided network.

func MakeGenesis

func MakeGenesis(network netconf.ID, valPubKeys ...crypto.PubKey) (*types.GenesisDoc, error)

func New

func New() *cobra.Command

New returns a new root cobra command that handles our command line tool.

func WriteCometConfig added in v0.10.0

func WriteCometConfig(path string, config *cfg.Config) (err error)

WriteCometConfig writes the cometBFT config to disk. TODO(corevr): Remove this once mempool.type issue is fixed upstream.

Types

type InitConfig

type InitConfig struct {
	HomeDir        string
	Moniker        string
	Network        netconf.ID
	TrustedSync    bool
	AddrBook       bool
	LogCfgFunc     func(*log.Config)
	HaloCfgFunc    func(*halocfg.Config)
	CometCfgFunc   func(*cmtconfig.Config)
	Force          bool
	Clean          bool
	ExecutionHash  common.Hash
	GenesisUpgrade string // Zero value omits network upgrade genesis tx
}

InitConfig is the config for the init command.

func (InitConfig) CometCfg

func (c InitConfig) CometCfg(cfg *cmtconfig.Config)

func (InitConfig) HaloCfg

func (c InitConfig) HaloCfg(cfg *halocfg.Config)

func (InitConfig) LogCfg

func (c InitConfig) LogCfg() log.Config

func (InitConfig) Verify

func (c InitConfig) Verify() error

Jump to

Keyboard shortcuts

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