config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2018 License: MIT Imports: 7 Imported by: 12

Documentation

Index

Constants

View Source
const (
	DefaultConfigFilename = "./config.json"
)

Variables

View Source
var (
	Parameters configParams
	Version    string
)

Functions

This section is empty.

Types

type ChainParams

type ChainParams struct {
	Name               string
	PowLimit           *big.Int
	PowLimitBits       uint32
	TargetTimespan     time.Duration
	TargetTimePerBlock time.Duration
	AdjustmentFactor   int64
	MaxOrphanBlocks    int
	MinMemoryNodes     uint32
	SpendCoinbaseSpan  uint32
}

type ConfigFile

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

type Configuration

type Configuration struct {
	Magic                      uint32           `json:"Magic"`
	SpvMagic                   uint32           `json:"SpvMagic"`
	Version                    int              `json:"Version"`
	SeedList                   []string         `json:"SeedList"`
	SpvSeedList                []string         `json:"SpvSeedList"`
	SpvMinOutbound             int              `json:"SpvMinOutbound"`
	SpvMaxConnections          int              `json:"SpvMaxConnections"`
	SpvPrintLevel              int              `json:"SpvPrintLevel"`
	ExchangeRate               float64          `json:"ExchangeRate"`
	MinCrossChainTxFee         int              `json:"MinCrossChainTxFee"`
	HttpRestPort               int              `json:"HttpRestPort"`
	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"`
	OauthServerUrl             string           `json:"OauthServerUrl"`
	NoticeServerUrl            string           `json:"NoticeServerUrl"`
	NodePort                   uint16           `json:"NodePort"`
	WebSocketPort              int              `json:"WebSocketPort"`
	PrintLevel                 int              `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"`
	MaxTxInBlock               int              `json:"MaxTransactionInBlock"`
	MaxBlockSize               int              `json:"MaxBlockSize"`
	PowConfiguration           PowConfiguration `json:"PowConfiguration"`
	FoundationAddress          string           `json:"FoundationAddress"`
	MainChainFoundationAddress string           `json:"MainChainFoundationAddress"`
}

type PowConfiguration

type PowConfiguration struct {
	PayToAddr        string `json:"PayToAddr"`
	MiningServerIP   string `josn:"MiningServerIP"`
	MiningServerPort int    `josn:"MiningServerPort"`
	MiningSelfPort   int    `josn:"MiningSelfPort"`
	TestNet          bool   `json:"testnet"`
	AutoMining       bool   `json:"AutoMining"`
	MinerInfo        string `json:"MinerInfo"`
	MinTxFee         int    `json:"MinTxFee"`
	ActiveNet        string `json:"ActiveNet"`
}

Jump to

Keyboard shortcuts

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