Documentation ¶
Index ¶
- func CalculateDelegatorReward(weight big.Float, remainingReward types.Float) (types.Float, error)
- func CalculateSuperchargedWeighting(block model.Block) (types.Float, error)
- func CalculateValidatorReward(blockReward types.Amount, validatorFee types.Float) (types.Float, error)
- func CalculateWeight(balance types.Amount, totalStakedAmount types.Amount) (types.Float, error)
- func CalculateWeightsNonSupercharged(delegations []model.Delegation) error
- func CalculateWeightsSupercharged(superchargedWeighting types.Float, delegations []model.Delegation, ...) error
- func DayInterval(t time.Time) (time.Time, time.Time)
- func HourInterval(t time.Time) (time.Time, time.Time)
- func MustInt64(input string) int64
- func MustTime(input string) time.Time
- func MustUInt64(input string) uint64
- func ParseBase58(input string) []byte
- func ParseInt(input string) (int, error)
- func ParseInt64(input string) (int64, error)
- func ParseMemoText(input string) string
- func ParseTime(input string) (*time.Time, error)
- func ParseUInt64(input string) (uint64, error)
- func SHA1(input string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateDelegatorReward ¶ added in v0.11.0
CalculateDelegatorReward calculates delegator reward
func CalculateSuperchargedWeighting ¶ added in v0.11.0
CalculateSuperchargedWeighting calculates supercharged weighting for given block supercharged weighting = 1 + (1 / (1 + transaction fees / coinbase))
func CalculateValidatorReward ¶ added in v0.11.0
func CalculateValidatorReward(blockReward types.Amount, validatorFee types.Float) (types.Float, error)
CalculateValidatorReward calculates validator reward
func CalculateWeight ¶ added in v0.11.0
CalculateWeight calculates weight
func CalculateWeightsNonSupercharged ¶ added in v0.11.0
func CalculateWeightsNonSupercharged(delegations []model.Delegation) error
CalculateWeightsNonSupercharged calculates weights when block reward is not doubled for supercharged
func CalculateWeightsSupercharged ¶ added in v0.11.0
func CalculateWeightsSupercharged(superchargedWeighting types.Float, delegations []model.Delegation, records []model.LedgerEntry) error
CalculateWeightsSupercharged calculates weights when block reward is doubled for supercharged
func DayInterval ¶
DayInterval returns a time interval for 24h
func HourInterval ¶
HourInterval returns a time interval for an hour
func MustUInt64 ¶
MustUInt64 returns an UInt64 value without an error
func ParseInt64 ¶
ParseInt64 returns an Int64 from a string
func ParseMemoText ¶
ParseMemoText returns memo plaintext from base58 data
func ParseUInt64 ¶
ParseUInt64 returns an UInt64 from a string
Types ¶
This section is empty.