bootnode

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StartBootNodeCmd = &cobra.Command{
	Use:   "start-boot-node",
	Short: "Starts boot node for discovery based ENR",
	Run: func(cmd *cobra.Command, args []string) {
		commons.SetBuildData(cmd.Parent().Short, cmd.Parent().Version)

		if err := cleanenv.ReadConfig(globalArgs.ConfigPath, &cfg); err != nil {
			log.Fatal(err)
		}

		err := logging.SetGlobalLogger(
			cfg.LogLevel,
			cfg.LogLevelFormat,
			cfg.LogFormat,
			&logging.LogFileOptions{
				FileName:   cfg.LogFilePath,
				MaxSize:    cfg.LogFileSize,
				MaxBackups: cfg.LogFileBackups,
			},
		)

		if err != nil {
			log.Fatal(err)
		}

		logger := zap.L()

		logger.Info(fmt.Sprintf("starting %v", commons.GetBuildData()))

		bootNode, err := bootnode.New(cfg.Options)
		if err != nil {
			logger.Fatal("failed to set up boot node", zap.Error(err))
		}
		if err := bootNode.Start(cmd.Context(), logger); err != nil {
			logger.Fatal("failed to start boot node", zap.Error(err))
		}
	},
}

StartBootNodeCmd is the command to start SSV boot node

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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