config

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 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) BasicCheck added in v0.15.0

func (conf *Config) BasicCheck() error

BasicCheck performs basic checks on the configuration.

type NodeConfig

type NodeConfig struct {
	NumValidators   int      `toml:"num_validators"` // TODO: we can remove this now
	RewardAddresses []string `toml:"reward_addresses"`
}

func DefaultNodeConfig

func DefaultNodeConfig() *NodeConfig

func (*NodeConfig) BasicCheck added in v0.15.0

func (conf *NodeConfig) BasicCheck() error

BasicCheck performs basic checks on the configuration.

Jump to

Keyboard shortcuts

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