Documentation ¶
Index ¶
- Variables
- func GetMultipliedYield(reward, stake *big.Int) *big.Int
- func GetValidatorsYield(rewards map[string]*big.Int, validators *Validators) []storage.ValidatorYield
- func GetYieldForInterval(yields_sum, blocks_per_year *big.Int, elem_count int64) float64
- func ZeroTotalRewards() (tr totalPeriodRewards)
- type IntervalRewards
- type Rewards
- func (r *Rewards) AfterCommit()
- func (r *Rewards) GetIntervalRewards(periodStats *storage.RewardsStats, distributionFrequency uint32) (intervalRewards IntervalRewards)
- func (r *Rewards) Process(total_minted *big.Int, dags []chain.DagBlock, trxs []chain.Transaction, ...) (currentBlockFee *big.Int)
- func (r *Rewards) ProcessStats(periodStats *storage.RewardsStats, total_minted *big.Int, totalStake *big.Int) (*big.Int, *big.Int)
- type RewardsStats
- type Validators
Constants ¶
This section is empty.
Variables ¶
View Source
var YieldFractionDecimalPrecision = big.NewInt(1e+6)
Functions ¶
func GetValidatorsYield ¶
func GetValidatorsYield(rewards map[string]*big.Int, validators *Validators) []storage.ValidatorYield
func GetYieldForInterval ¶
func ZeroTotalRewards ¶
func ZeroTotalRewards() (tr totalPeriodRewards)
Types ¶
type IntervalRewards ¶
type Rewards ¶
type Rewards struct {
// contains filtered or unexported fields
}
func MakeRewards ¶
func (*Rewards) AfterCommit ¶
func (r *Rewards) AfterCommit()
func (*Rewards) GetIntervalRewards ¶
func (r *Rewards) GetIntervalRewards(periodStats *storage.RewardsStats, distributionFrequency uint32) (intervalRewards IntervalRewards)
type RewardsStats ¶
type RewardsStats struct { storage.RewardsStats ValidatorsStats map[string]storage.ValidatorStats }
func (*RewardsStats) ToStorage ¶
func (s *RewardsStats) ToStorage() *storage.RewardsStats
type Validators ¶
type Validators struct {
// contains filtered or unexported fields
}
func MakeValidators ¶
func MakeValidators(config *common.Config, validators []chain.Validator) *Validators
func (*Validators) Exists ¶
func (v *Validators) Exists(address string) bool
func (*Validators) IsEligible ¶
func (v *Validators) IsEligible(address string) bool
Click to show internal directories.
Click to hide internal directories.