config

package
v2.1.4+incompatible Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: GPL-3.0 Imports: 8 Imported by: 37

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultDataDir added in v1.3.0

func DefaultDataDir() string

DefaultDataDir is the default data directory to use for the databases and other persistence requirements.

func IsCompleteGenesisConfig

func IsCompleteGenesisConfig(genesisConfig *Genesis) bool

Types

type Chain

type Chain struct {
	LedgerGcRetain uint64
	GenesisFile    string
	LedgerGc       bool
	OpenPlugins    bool
}

type Config

type Config struct {
	*Producer   `json:"Producer"`
	*Chain      `json:"Chain"`
	*Vm         `json:"Vm"`
	*Subscribe  `json:"Subscribe"`
	*Net        `json:"Net"`
	*biz.Reward `json:"Reward"`
	*Genesis    `json:"Genesis"`

	// global keys
	DataDir string `json:"DataDir"`
	//Log level
	LogLevel string `json:"LogLevel"`
}

func (Config) RunLogDir

func (c Config) RunLogDir() string

type ConsensusGroupContractInfo

type ConsensusGroupContractInfo struct {
	ConsensusGroupInfoMap map[string]ConsensusGroupInfo          // consensus group info, gid - info
	RegistrationInfoMap   map[string]map[string]RegistrationInfo // registration info, gid - nodeName - info
	HisNameMap            map[string]map[string]string           // used node name for node addr, gid - nodeAddr - nodeName
	VoteStatusMap         map[string]map[string]string           // vote info, gid - voteAddr - nodeName
}

type ConsensusGroupInfo added in v1.2.0

type ConsensusGroupInfo struct {
	NodeCount              uint8
	Interval               int64
	PerCount               int64
	RandCount              uint8
	RandRank               uint8
	Repeat                 uint16
	CheckLevel             uint8
	CountingTokenId        types.TokenTypeId
	RegisterConditionId    uint8
	RegisterConditionParam RegisterConditionParam
	VoteConditionId        uint8
	VoteConditionParam     VoteConditionParam
	Owner                  types.Address
	PledgeAmount           *big.Int
	WithdrawHeight         uint64
}

type ForkPoint added in v1.2.0

type ForkPoint struct {
	Height uint64
	Hash   *types.Hash
}

type ForkPoints added in v1.2.0

type ForkPoints struct{}

type Genesis added in v1.2.0

type Genesis struct {
	GenesisAccountAddress *types.Address
	ForkPoints            *ForkPoints
	ConsensusGroupInfo    *ConsensusGroupContractInfo
	MintageInfo           *MintageContractInfo
	PledgeInfo            *PledgeContractInfo
	AccountBalanceMap     map[string]map[string]*big.Int // address - tokenId - balanceAmount
}

type GenesisVmLog

type GenesisVmLog struct {
	Data   string
	Topics []types.Hash
}

type MintageContractInfo

type MintageContractInfo struct {
	TokenInfoMap map[string]TokenInfo // tokenId - info
	LogList      []GenesisVmLog       // mint events
}

type Net

type Net struct {
	Single             bool     `json:"Single"`
	FileListenAddress  string   `json:"FileListenAddress"`
	ForwardStrategy    string   `json:"ForwardStrategy"`
	TraceEnabled       bool     `json:"TraceEnabled"`
	AccessControl      string   `json:"AccessControl"` // producer special any
	AccessAllowKeys    []string `json:"AccessAllowKeys"`
	AccessDenyKeys     []string `json:"AccessDenyKeys"`
	BlackBlockHashList []string `json:"BlackBlockHashList"`

	MinePrivateKey ed25519.PrivateKey
	P2PPrivateKey  ed25519.PrivateKey
}

type PledgeContractInfo

type PledgeContractInfo struct {
	PledgeInfoMap       map[string][]PledgeInfo
	PledgeBeneficialMap map[string]*big.Int
}

type PledgeInfo

type PledgeInfo struct {
	Amount         *big.Int
	WithdrawHeight uint64
	BeneficialAddr types.Address
}

type Producer

type Producer struct {
	Producer         bool   `json:"Producer"`
	Coinbase         string `json:"Coinbase"`
	EntropyStorePath string `json:"EntropyStorePath"`
}

type RegisterConditionParam

type RegisterConditionParam struct {
	PledgeAmount *big.Int
	PledgeToken  types.TokenTypeId
	PledgeHeight uint64
}

type RegistrationInfo

type RegistrationInfo struct {
	NodeAddr       types.Address
	PledgeAddr     types.Address
	Amount         *big.Int
	WithdrawHeight uint64
	RewardTime     int64
	CancelTime     int64
	HisAddrList    []types.Address
}

type Subscribe added in v1.3.2

type Subscribe struct {
	IsSubscribe bool `json:"IsSubscribe"`
}

type TokenInfo

type TokenInfo struct {
	TokenName      string
	TokenSymbol    string
	TotalSupply    *big.Int
	Decimals       uint8
	Owner          types.Address
	PledgeAmount   *big.Int
	PledgeAddr     types.Address
	WithdrawHeight uint64
	MaxSupply      *big.Int
	OwnerBurnOnly  bool
	IsReIssuable   bool
}

type Vm

type Vm struct {
	IsVmTest         bool `json:"IsVmTest"`
	IsUseVmTestParam bool `json:"IsUseVmTestParam"`
	IsVmDebug        bool `json:"IsVmDebug"`
}

type VoteConditionParam

type VoteConditionParam struct {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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