Documentation
¶
Index ¶
- Constants
- Variables
- func CalGasFee(gasUsed uint64, gasPrice uint64) sdk.Int
- func CheckParamType(name, value string) bool
- func CleanParams() (before bool)
- func Diff(t string) (int64, error)
- func GetNow() string
- func GetTimeBefore(hours int) (string, error)
- func IsEthTx(tx *types.Transaction) bool
- func LoadParams(b []byte)
- func ParseFloat(str string) float64
- func ParseInt(str string) sdk.Int
- func RoundFloat(f float64, n int) float64
- func SetParam(name, value string) bool
- func ToWei(value int64) (result *big.Int)
- func UnloadParams() (b []byte)
- type Params
- type StateChangeObject
- type StateChangeReactor
Constants ¶
View Source
const ( CommitSeconds = 10 //BlocksPerHour = 60 * 60 / 10 // fixme just for test BlocksPerHour = 2 //BlocksPerDay = 24 * 60 * 60 / 10 BlocksPerDay = 1 )
Variables ¶
View Source
var ( BlockGasFee = big.NewInt(0) StateChangeQueue []StateChangeObject // Recording addresses associated with travis tx (stake/governance) in one block // Transfer transaction is not allowed if the sender of which was found in this recording // TODO to be removed TravisTxAddrs []*common.Address PendingProposal = &pendingProposal{ make(map[string]int64), math.MaxInt64, nil, make(map[string]int64), math.MaxInt64, nil, } MintAccount = common.HexToAddress("0000000000000000000000000000000000000000") HoldAccount = common.HexToAddress("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") GovHoldAccount = common.HexToAddress("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") )
View Source
var GOOSDIST string
View Source
var GOOSVERS string
View Source
var ( // Keys for store prefixes ParamKey = []byte{0x01} // key for global parameters )
View Source
var SUPPORT_OS = map[string][]string{
"ubuntu": {"16.04"},
"centos": {"^7.0"},
}
Functions ¶
func CheckParamType ¶
func CleanParams ¶
func CleanParams() (before bool)
func GetTimeBefore ¶
func IsEthTx ¶
func IsEthTx(tx *types.Transaction) bool
func ParseFloat ¶
func RoundFloat ¶
func UnloadParams ¶
func UnloadParams() (b []byte)
Types ¶
type Params ¶
type Params struct { HoldAccount common.Address `json:"hold_account"` // PubKey where all bonded coins are held MaxVals uint16 `json:"max_vals" type:"uint"` // maximum number of validators BackupVals uint16 `json:"backup_vals" type:"uint"` // number of backup validators SelfStakingRatio sdk.Rat `json:"self_staking_ratio" type:"rat"` InflationRate sdk.Rat `json:"inflation_rate" type:"rat"` ValidatorSizeThreshold sdk.Rat `json:"validator_size_threshold" type:"rat"` UnstakeWaitingPeriod uint64 `json:"unstake_waiting_period" type:"uint"` ProposalExpirePeriod uint64 `json:"proposal_expire_period" type:"uint"` DeclareCandidacy uint64 `json:"declare_candidacy" type:"uint"` UpdateCandidacy uint64 `json:"update_candidacy" type:"uint"` TransferFundProposal uint64 `json:"transfer_fund_proposal" type:"uint"` ChangeParamsProposal uint64 `json:"change_params_proposal" type:"uint"` DeployLibEniProposal uint64 `json:"deploy_libeni_proposal" type:"uint"` GasPrice uint64 `json:"gas_price" type:"uint"` MinStakingAmount int64 `json:"min_staking_amount" type:"uint"` ValidatorsBlockAwardRatio sdk.Rat `json:"validators_block_award_ratio" type:"rat"` MaxSlashingBlocks int16 `json:"max_slashing_blocks" type:"uint"` SlashingRatio sdk.Rat `json:"slashing_ratio" type:"rat"` CubePubKeys string `json:"cube_pub_keys" type:"json"` LowPriceTxGasLimit uint64 `json:"low_price_tx_gas_limit" type:"uint"` LowPriceTxSlotsCap int `json:"low_price_tx_slots_cap" type:"int"` SetCompRate uint64 `json:"set_comp_rate" type:"uint"` }
type StateChangeObject ¶
type StateChangeReactor ¶
type StateChangeReactor interface {
React(result, msg string)
}
Click to show internal directories.
Click to hide internal directories.