commands

package
v0.0.0-...-0eca64e Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:              "evml",
	Short:            "EVM-Lite node",
	TraverseChildren: true,
	PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
		if cmd.Name() == VersionCmd.Name() {
			return nil
		}

		if err := bindFlagsLoadViper(cmd); err != nil {
			return err
		}

		config, err = parseConfig()
		if err != nil {
			return err
		}

		logger = logrus.New()
		logger.Level = logLevel(config.BaseConfig.LogLevel)

		config.SetDataDir(config.BaseConfig.DataDir)

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

		return nil
	},
}

RootCmd is the root command for evml

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 evml being used

Functions

func AddBabbleFlags

func AddBabbleFlags(cmd *cobra.Command)

AddBabbleFlags adds flags to the Babble command

func AddRaftFlags

func AddRaftFlags(cmd *cobra.Command)

AddRaftFlags adds flags to the Raft command

func AddSoloFlags

func AddSoloFlags(cmd *cobra.Command)

AddSoloFlags adds flags to the Solo command

func AddTendermintFlags

func AddTendermintFlags(cmd *cobra.Command)

AddTendermintFlags adds flags to the Tendermint command

func NewBabbleCmd

func NewBabbleCmd() *cobra.Command

NewBabbleCmd returns the command that starts EVM-Lite with Babble consensus

func NewRaftCmd

func NewRaftCmd() *cobra.Command

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

func NewSoloCmd

func NewSoloCmd() *cobra.Command

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

func NewTendermintCmd

func NewTendermintCmd() *cobra.Command

NewTendermintCmd returns the command that starts EVM-Lite with Tendermint consensus

func ParseConfig

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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