commands

package
v0.0.0-...-77adb20 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:              "evm",
	Short:            "LightWeight EVM",
	TraverseChildren: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {

		logger.Level = logLevel(config.BaseConfig.LogLevel)
		setEthereumLogLevel(config.BaseConfig.LogLevel)

		if cmd.Name() == VersionCmd.Name() {
			return nil
		}

		if err := bindFlagsLoadViper(cmd); err != nil {
			logger.WithError(err).Debug("bindFlagsLoadViper")
			return err
		}

		config, err = ParseConfig()
		if err != nil {
			logger.WithError(err).Debug("ParseConfig")
			return err
		}

		config.SetDataDir(config.BaseConfig.DataDir)

		logger.WithFields(logrus.Fields{
			"Base":     config.BaseConfig,
			"Eth":      config.Eth,
			"Lachesis": config.Lachesis}).Debug("Config")

		return nil
	},
}

RootCmd is the root command for evm

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

VersionCmd displays the version of the evm program being used

Functions

func AddLachesisFlags

func AddLachesisFlags(cmd *cobra.Command)

AddLachesisFlags adds flags to the Lachesis command

func AddRaftFlags

func AddRaftFlags(cmd *cobra.Command)

AddRaftFlags adds flags to the Raft command

func AddRunFlags

func AddRunFlags(cmd *cobra.Command)

AddRunFlags adds flags to the Run command

func AddSoloFlags

func AddSoloFlags(cmd *cobra.Command)

AddSoloFlags adds flags to the Solo command

func NewLachesisCmd

func NewLachesisCmd() *cobra.Command

NewLachesisCmd returns the command that starts EVM-Lite with Lachesis consensus

func NewRaftCmd

func NewRaftCmd() *cobra.Command

NewRaftCmd returns the command that starts EVM-Lite with Raft consensus

func NewRunCmd

func NewRunCmd() *cobra.Command

NewRunCmd returns the command that allows the CLI to start a node.

func NewSoloCmd

func NewSoloCmd() *cobra.Command

NewSoloCmd returns the command that starts EVM-Lite with Solo consensus

func ParseConfig

func ParseConfig() (*_config.Config, error)

ParseConfig retrieves the default environment configuration, sets up the Tendermint root and ensures that the root exists

Types

This section is empty.

Jump to

Keyboard shortcuts

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