Documentation ¶
Index ¶
- Variables
- func CalGasFee(gasUsed uint64, gasPrice uint64) *big.Int
- func CheckParamType(name, value string) bool
- func CleanParams() (before bool)
- func GetNow() string
- func IsEthTx(tx *types.Transaction) bool
- func LoadParams(b []byte)
- func ParseFloat(str string) float64
- func ParseInt(str string) *big.Int
- func SetParam(name, value string) bool
- func ToWei(value int64) (result *big.Int)
- func UnloadParams() (b []byte)
- type Params
- type StateChangeObject
- type StateChangeReactor
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BlockGasFee *big.Int 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 NonceCheckedTx map[common.Hash]bool = make(map[common.Hash]bool) PendingProposal = &pendingProposal{ make(map[string]uint64), math.MaxUint64, nil, } MintAccount = common.HexToAddress("0000000000000000000000000000000000000000") HoldAccount = common.HexToAddress("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") GovHoldAccount = common.HexToAddress("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") )
View Source
var ( // Keys for store prefixes ParamKey = []byte{0x01} // key for global parameters )
Functions ¶
func CheckParamType ¶
func CleanParams ¶
func CleanParams() (before bool)
func IsEthTx ¶
func IsEthTx(tx *types.Transaction) bool
func ParseFloat ¶
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 SelfStakingRatio string `json:"self_staking_ratio" type:"float"` InflationRate int64 `json:"inflation_rate" type:"uint"` ValidatorSizeThreshold string `json:"validator_size_threshold" type:"float"` 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"` GasPrice uint64 `json:"gas_price" type:"uint"` MinStakingAmount int64 `json:"min_staking_amount" type:"int"` ValidatorsBlockAwardRatio int64 `json:"validators_block_award_ratio" type:"int"` MaxSlashingBlocks int16 `json:"max_slashing_blocks" type:"int"` SlashingRatio string `json:"slashing_ratio" type:"float"` CubePubKeys string `json:"cube_pub_keys" type:"json"` }
type StateChangeObject ¶
type StateChangeReactor ¶
type StateChangeReactor interface {
React(result, msg string)
}
Click to show internal directories.
Click to hide internal directories.