config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveLocalnetConfig

func SaveLocalnetConfig(path string, numValidators int) error

func SaveMainnetConfig

func SaveMainnetConfig(path string, numValidators int) error

func SaveTestnetConfig

func SaveTestnetConfig(path string, numValidators int) error

Types

type Config

type Config struct {
	Node      *NodeConfig       `toml:"node"`
	Store     *store.Config     `toml:"store"`
	Network   *network.Config   `toml:"network"`
	Sync      *sync.Config      `toml:"sync"`
	TxPool    *txpool.Config    `toml:"tx_pool"`
	Consensus *consensus.Config `toml:"consensus"`
	Logger    *logger.Config    `toml:"logger"`
	GRPC      *grpc.Config      `toml:"grpc"`
	HTTP      *http.Config      `toml:"http"`
	Nanomsg   *nanomsg.Config   `toml:"nanomsg"`
}

func DefaultConfig

func DefaultConfig() *Config

func LoadFromFile

func LoadFromFile(file string, strict bool) (*Config, error)

func (*Config) SanityCheck

func (conf *Config) SanityCheck() error

SanityCheck performs basic checks on the configuration.

type NodeConfig

type NodeConfig struct {
	NumValidators   int      `toml:"num_validators"`
	RewardAddresses []string `toml:"reward_addresses"`
}

func DefaultNodeConfig

func DefaultNodeConfig() *NodeConfig

func (*NodeConfig) SanityCheck

func (conf *NodeConfig) SanityCheck() error

SanityCheck performs basic checks on the configuration.

Jump to

Keyboard shortcuts

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