config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultConfigFilename = "./config.json"
	MINGENBLOCKTIME       = 2
	DefaultGenBlockTime   = 6

	DataPath   = "elastos"
	DataDir    = "data"
	ChainDir   = "chain"
	DposDir    = "dpos"
	LogDir     = "logs"
	NodeDir    = "node"
	ArbiterDir = "arbiter"

	MajorityCount    = 3
	ArbitratorsCount = 5
	EnableArbiter    = false
)

Variables

View Source
var (
	Parameters configParams
	Version    string
)

Functions

This section is empty.

Types

type ArbiterConfiguration added in v0.2.2

type ArbiterConfiguration struct {
	Name            string `json:"Name"`
	Magic           uint32 `json:"Magic"`
	NodePort        uint16 `json:"NodePort"`
	ProtocolVersion uint32 `json:"ProtocolVersion"`
	Services        uint64 `json:"Services"`
	PrintLevel      uint8  `json:"PrintLevel"`
	SignTolerance   uint64 `json:"SignTolerance"`
	MaxLogsSize     int64  `json:"MaxLogsSize"`
	MaxPerLogSize   int64  `json:"MaxPerLogSize"`
	MaxConnections  int    `json:"MaxConnections"`
	CandidatesCount uint32 `json:"CandidatesCount"`
}

type ChainParams

type ChainParams struct {
	Name               string        `json:"Name"`
	PowLimit           *big.Int      `json:"PowLimit"`
	PowLimitBits       uint32        `json:"PowLimitBits"`
	TargetTimePerBlock time.Duration `json:"TargetTimePerBlock"`
	TargetTimespan     time.Duration `json:"TargetTimespan"`
	AdjustmentFactor   int64         `json:"AdjustmentFactor"`
	MaxOrphanBlocks    int           `json:"MaxOrphanBlocks"`
	MinMemoryNodes     uint32        `json:"MinMemoryNodes"`
	CoinbaseLockTime   uint32        `json:"CoinbaseLockTime"`
}

type ConfigFile

type ConfigFile struct {
	ConfigFile Configuration `json:"Configuration"`
}

type Configuration

type Configuration struct {
	Magic                uint32               `json:"Magic"`
	FoundationAddress    string               `json:"FoundationAddress"`
	Version              int                  `json:"Version"`
	SeedList             []string             `json:"SeedList"`
	HttpRestPort         int                  `json:"HttpRestPort"`
	MinCrossChainTxFee   int                  `json:"MinCrossChainTxFee"`
	RestCertPath         string               `json:"RestCertPath"`
	RestKeyPath          string               `json:"RestKeyPath"`
	HttpInfoPort         uint16               `json:"HttpInfoPort"`
	HttpInfoStart        bool                 `json:"HttpInfoStart"`
	OpenService          bool                 `json:"OpenService"`
	HttpWsPort           int                  `json:"HttpWsPort"`
	WsHeartbeatInterval  time.Duration        `json:"WsHeartbeatInterval"`
	HttpJsonPort         int                  `json:"HttpJsonPort"`
	NodePort             uint16               `json:"NodePort"`
	NodeOpenPort         uint16               `json:"NodeOpenPort"`
	PrintLevel           uint8                `json:"PrintLevel"`
	IsTLS                bool                 `json:"IsTLS"`
	CertPath             string               `json:"CertPath"`
	KeyPath              string               `json:"KeyPath"`
	CAPath               string               `json:"CAPath"`
	MultiCoreNum         uint                 `json:"MultiCoreNum"`
	MaxLogsSize          int64                `json:"MaxLogsSize"`
	MaxPerLogSize        int64                `json:"MaxPerLogSize"`
	MaxTxsInBlock        int                  `json:"MaxTransactionInBlock"`
	MaxBlockSize         int                  `json:"MaxBlockSize"`
	PowConfiguration     PowConfiguration     `json:"PowConfiguration"`
	VoteHeight           uint32               `json:"VoteHeight"`
	Arbiters             []string             `json:"Arbiters"`
	ArbiterConfiguration ArbiterConfiguration `json:"ArbiterConfiguration"`
	RpcConfiguration     RpcConfiguration     `json:"RpcConfiguration"`
}

func (*Configuration) GetArbiterID added in v0.2.2

func (config *Configuration) GetArbiterID() []byte

type PowConfiguration

type PowConfiguration struct {
	PayToAddr  string `json:"PayToAddr"`
	AutoMining bool   `json:"AutoMining"`
	MinerInfo  string `json:"MinerInfo"`
	MinTxFee   int    `json:"MinTxFee"`
	ActiveNet  string `json:"ActiveNet"`
}

type RpcConfiguration added in v0.2.2

type RpcConfiguration struct {
	User        string   `json:"User"`
	Pass        string   `json:"Pass"`
	WhiteIPList []string `json:"WhiteIPList"`
}

type Seed added in v0.2.2

type Seed struct {
	PublicKey string `json:"PublicKey"`
	Address   string `json:"Address"`
}

Jump to

Keyboard shortcuts

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