distribution

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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)

func Query

func Query(ctx context.Context, route []string, req abci.RequestQuery) (res []byte, err btypes.Error)

Types

type DelegatorEarningStartState

type DelegatorEarningStartState struct {
	ValidatorPubKey            crypto.PubKey                    `json:"validator_pub_key"`
	DeleAddress                btypes.Address                   `json:"delegator_address"`
	DelegatorEarningsStartInfo types.DelegatorEarningsStartInfo `json:"earning_start_info"`
}

type DelegatorIncomeHeightState

type DelegatorIncomeHeightState struct {
	ValidatorPubKey crypto.PubKey  `json:"validator_pub_key"`
	DeleAddress     btypes.Address `json:"delegator_address"`
	Height          uint64         `json:"height"`
}

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 ValidatorHistoryPeriodState

type ValidatorHistoryPeriodState struct {
	ValidatorPubKey crypto.PubKey   `json:"validator_pubkey"`
	Period          uint64          `json:"period"`
	Summary         qtypes.Fraction `json:"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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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