Documentation
¶
Index ¶
- func BeginBlocker(ctx context.Context, req abci.RequestBeginBlock)
- func EndBlocker(ctx context.Context, req abci.RequestEndBlock)
- func InitGenesis(ctx context.Context, data GenesisState)
- func Query(ctx context.Context, route []string, req abci.RequestQuery) (res []byte, err btypes.Error)
- type DelegatorEarningStartState
- type DelegatorIncomeHeightState
- type DelegatorIncomeInfoQueryResult
- type GenesisState
- type ValidatorCurrentPeriodState
- type ValidatorHistoryPeriodState
- type ValidatorPeriodInfoQueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeginBlocker ¶
func BeginBlocker(ctx context.Context, req abci.RequestBeginBlock)
beginblocker根据Vote信息进行QOS分配: mint+tx fee
func EndBlocker ¶
func EndBlocker(ctx context.Context, req abci.RequestEndBlock)
endblocker对delegator的收益进行发放,并决定是否有下一次收益
func InitGenesis ¶
func InitGenesis(ctx context.Context, data GenesisState)
Types ¶
type DelegatorIncomeInfoQueryResult ¶
type DelegatorIncomeInfoQueryResult struct {
OwnerAddr btypes.Address `json:"owner_address"`
ValidatorPubKey crypto.PubKey `json:"validator_pub_key"`
PreviousPeriod uint64 `json:"previous_validaotr_period"`
BondToken uint64 `json:"bond_token"`
CurrentStartingHeight uint64 `json:"earns_starting_height"`
FirstDelegateHeight uint64 `json:"first_delegate_height"`
HistoricalRewardFees btypes.BigInt `json:"historical_rewards"`
LastIncomeCalHeight uint64 `json:"last_income_calHeight"`
LastIncomeCalFees btypes.BigInt `json:"last_income_calFees"`
}
type GenesisState ¶
type GenesisState struct {
CommunityFeePool btypes.BigInt `json:"community_fee_pool"`
LastBlockProposer btypes.Address `json:"last_block_proposer"`
PreDistributionQOSAmount btypes.BigInt `json:"pre_distribute_amount"`
ValidatorHistoryPeriods []ValidatorHistoryPeriodState `json:"validators_history_period"`
ValidatorCurrentPeriods []ValidatorCurrentPeriodState `json:"validators_current_period"`
DelegatorEarningInfos []DelegatorEarningStartState `json:"delegators_earning_info"`
DelegatorIncomeHeights []DelegatorIncomeHeightState `json:"delegators_income_height"`
Params types.DistributionParams `json:"params"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx context.Context, forZeroHeight bool) GenesisState
func NewGenesisState ¶
func NewGenesisState(communityFeePool btypes.BigInt, lastBlockProposer btypes.Address, preDistributionQOSAmount btypes.BigInt, validatorHistoryPeriods []ValidatorHistoryPeriodState, validatorCurrentPeriods []ValidatorCurrentPeriodState, delegatorEarningInfos []DelegatorEarningStartState, delegatorIncomeHeights []DelegatorIncomeHeightState, params types.DistributionParams) GenesisState
type ValidatorCurrentPeriodState ¶
type ValidatorCurrentPeriodState struct {
ValidatorPubKey crypto.PubKey `json:"validator_pub_key"`
CurrentPeriodSummary types.ValidatorCurrentPeriodSummary `json:"current_period_summary"`
}
type ValidatorPeriodInfoQueryResult ¶
type ValidatorPeriodInfoQueryResult struct {
OwnerAddr btypes.Address `json:"owner_address"`
ValidatorPubKey crypto.PubKey `json:"validator_pub_key"`
Fees btypes.BigInt `json:"fees"`
CurrentTokens uint64 `json:"current_tokens"`
CurrentPeriod uint64 `json:"current_period"`
LastPeriod uint64 `json:"last_period"`
LastPeriodFraction qtypes.Fraction `json:"last_period_fraction"`
}
Click to show internal directories.
Click to hide internal directories.