config

package
v2.10.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: GPL-3.0 Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HomeDir = ""

Functions

This section is empty.

Types

type Base

type Base struct {
	DataDir string `yaml:"dataDir"`
	Log     string `yaml:"log"`
}

func (*Base) Check

func (cfg *Base) Check() error

type Boot

type Boot struct {
	BootAddr string `yaml:"addr"`
	Enabled  bool   `yaml:"enabled"`
}

func (*Boot) Check

func (bCfg *Boot) Check(cfg *Base) error

type Chain

type Chain struct {
	StoreType common.StoreDBType `yaml:"storeType"`
	DBPath    string             `yaml:"dbPath"`
	DataDir   string
}

func (*Chain) Check

func (ch *Chain) Check(cfg *Base) error

type Consensus

type Consensus struct {
	Interval int `yaml:"interval"`
	MemCnt   int `yaml:"memCnt"`
}

func (*Consensus) Check

func (ch *Consensus) Check(cfg *Base) error

type Miner

type Miner struct {
	Enabled     bool   `yaml:"enabled"`
	HexCoinbase string `yaml:"coinbase"`
}

func (*Miner) Check

func (mCfg *Miner) Check(cfg *Base) error

func (*Miner) CoinBase

func (mCfg *Miner) CoinBase() common.Address

type Node

type Node struct {
	P2pCfg       *P2P       `yaml:"p2p"`
	ConsensusCfg *Consensus `yaml:"consensus"`
	MinerCfg     *Miner     `yaml:"miner"`
	ChainCfg     *Chain     `yaml:"chain"`
	BaseCfg      *Base      `yaml:"base"`
	BootCfg      *Boot      `yaml:"boot"`
}

func (*Node) Check

func (nCfg *Node) Check() error

func (*Node) Parse

func (nCfg *Node) Parse(cfg string) error

type P2P

type P2P struct {
	NodeId       string `yaml:"nodeId"`
	Port         int    `yaml:"port"`
	NetId        int    `yaml:"netId"`
	LinkBootAddr string `yaml:"bootAddr"`
}

func (*P2P) Check

func (ppCfg *P2P) Check(cfg *Base) error

Jump to

Keyboard shortcuts

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