Documentation ¶
Index ¶
Constants ¶
View Source
const ( Qos = int64(1e8) BlockReward = int64(0 * Qos) )
View Source
const ( //Active 可获得挖矿奖励状态 Active int8 = iota //Inactive Inactive //Inactive Code Revoke InactiveCode = iota MissVoteBlock MaxValidator )
Variables ¶
View Source
var ( DefaultCLIHome = os.ExpandEnv("$HOME/.qoscli") DefaultNodeHome = os.ExpandEnv("$HOME/.qosd") )
Functions ¶
func GetDefaultChainId ¶ added in v0.0.2
Get default chain-id.
Types ¶
type InactiveCode ¶ added in v0.0.3
type InactiveCode int8
type QSCInfo ¶ added in v0.0.3
type QSCInfo struct { Name string `json:"name"` //币名 ChainId string `json:"chain_id"` //证书可用链 Extrate string `json:"extrate"` //qcs:qos汇率(amino不支持binary形式的浮点数序列化,精度同qos erc20 [.0000]) Description string `json:"description"` //描述信息 Banker btypes.Address `json:"banker"` //Banker PubKey }
func NewQSCInfoWithQSCCA ¶ added in v0.0.3
func NewQSCInfoWithQSCCA(cer *cert.Certificate) QSCInfo
type SPOConfig ¶ added in v0.0.3
type SPOConfig struct { TotalAmount uint64 `json:"total_amount"` TotalBlock uint64 `json:"total_block"` }
func DefaultSPOConfig ¶ added in v0.0.3
func DefaultSPOConfig() SPOConfig
type StakeConfig ¶ added in v0.0.3
type StakeConfig struct { MaxValidatorCnt uint32 `json:"max_validator_cnt"` ValidatorVotingStatusLen uint32 `json:"voting_status_len"` ValidatorVotingStatusLeast uint32 `json:"voting_status_least"` ValidatorSurvivalSecs uint64 `json:"survival_secs"` }
func DefaultStakeConfig ¶ added in v0.0.3
func DefaultStakeConfig() StakeConfig
type Validator ¶ added in v0.0.2
type Validator struct { Name string `json:"name"` Owner btypes.Address `json:"owner"` ValidatorPubKey crypto.PubKey `json:"validatorPubkey"` BondTokens uint64 `json:"bondTokens"` //不能超过int64最大值 Description string `json:"description"` Status int8 `json:"status"` InactiveCode InactiveCode `json:"inactiveCode"` InactiveTime time.Time `json:"inactiveTime"` InactiveHeight uint64 `json:"inactiveHeight"` BondHeight uint64 `json:"bondHeight"` }
func (Validator) ToABCIValidator ¶ added in v0.0.2
type ValidatorVoteInfo ¶ added in v0.0.3
type ValidatorVoteInfo struct { StartHeight uint64 `json:"startHeight"` IndexOffset uint64 `json:"indexOffset"` MissedBlocksCounter uint64 `json:"missedBlocksCounter"` }
func NewValidatorVoteInfo ¶ added in v0.0.3
func NewValidatorVoteInfo(startHeight, indexOffset, missedBlocksCounter uint64) ValidatorVoteInfo
Click to show internal directories.
Click to hide internal directories.