config

package
v0.0.3-chain Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2018 License: GPL-3.0 Imports: 7 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	*P2P    `json:"P2P"`
	*Miner  `json:"Miner"`
	*Ledger `json:"Ledger"`

	// global keys
	DataDir string `json:"DataDir"`
	// for file transfer
	FilePort uint `json:"Port"`
	// report topoMsg
	Topo []string `json:"Topo"`
}
var GlobalConfig *Config

func (Config) RunLogDir

func (c Config) RunLogDir() string

func (Config) RunLogDirFile

func (c Config) RunLogDirFile() (string, error)

type Ledger

type Ledger struct {
	IsDownload bool `json:"IsDownload"`
}

type Miner

type Miner struct {
	Miner         bool   `json:"Miner"`
	Coinbase      string `json:"Coinbase"`
	MinerInterval int    `json:"MinerInterval"`
}

type P2P

type P2P struct {
	Name string `json:"Names""`

	// use for sign data
	PrivateKey string `json:"PrivateKey"`

	// `MaxPeers` is the maximum number of peers that can be connected.
	MaxPeers uint `json:"MaxPeers"`

	// `MaxPassivePeersRatio` is the ratio of MaxPeers that initiate an active connection to this node.
	// the actual value is `MaxPeers / MaxPassivePeersRatio`
	MaxPassivePeersRatio uint `json:"MaxPassivePeersRatio"`

	// `MaxPendingPeers` is the maximum number of peers that wait to connect.
	MaxPendingPeers uint `json:"MaxPendingPeers"`

	BootNodes []string `json:"BootNodes"`

	Port uint `json:"Port"`

	Datadir string `json:"Datadir"`

	NetID uint `json:"NetID"`
}

Jump to

Keyboard shortcuts

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