utils

package
v0.0.0-...-82415a5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDelegatorRewards

func GetDelegatorRewards(height int64, delegator string, distrClient distrtypes.QueryClient) ([]types.DelegatorRewardAmount, error)

GetDelegatorRewards returns the current rewards for the given delegator

func GetValidatorCommissionAmount

func GetValidatorCommissionAmount(
	height int64, validator types.Validator, distrClient distrtypes.QueryClient,
) (types.ValidatorCommissionAmount, error)

GetValidatorCommissionAmount returns the amount of the validator commission for the given validator

func RefreshDelegatorRewards

func RefreshDelegatorRewards(height int64, delegator string, distrClient distrtypes.QueryClient, db *database.Db) error

RefreshDelegatorRewards refreshes the rewards associated to the given delegator for the given height, deleting the ones existing and downloading them from scratch.

func UpdateCommunityPool

func UpdateCommunityPool(height int64, client distrtypes.QueryClient, db *database.Db) error

UpdateCommunityPool fetch total amount of coins in the system from RPC and store it into database

func UpdateDelegatorsRewardsAmounts

func UpdateDelegatorsRewardsAmounts(cfg *config.Config, height int64, client distrtypes.QueryClient, db *database.Db)

UpdateDelegatorsRewardsAmounts updates the delegators commission amounts

func UpdateValidatorsCommissionAmounts

func UpdateValidatorsCommissionAmounts(cfg *config.Config, height int64, client distrtypes.QueryClient, db *database.Db)

UpdateValidatorsCommissionAmounts updates the validator commission amounts

Types

This section is empty.

Jump to

Keyboard shortcuts

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