Versions in this module Expand all Collapse all v1 v1.1.0 Aug 14, 2019 Changes in this version + const AddrNotFoundInCouncilNodes + const DefaultGiniCoefficient + var ErrAddrNotInStakingInfo = errors.New("Address is not in stakingInfo") + func CalcGiniCoefficient(stakingAmount float64Slice) float64 + type BalanceAdder interface + AddBalance func(addr common.Address, v *big.Int) + type RewardDistributor struct + func NewRewardDistributor(gh governanceHelper) *RewardDistributor + func (rd *RewardDistributor) DistributeBlockReward(b BalanceAdder, header *types.Header, pocAddr common.Address, ...) error + func (rd *RewardDistributor) MintKLAY(b BalanceAdder, header *types.Header) error + type StakingInfo struct + BlockNum uint64 + CouncilNodeAddrs []common.Address + CouncilRewardAddrs []common.Address + CouncilStakingAddrs []common.Address + CouncilStakingAmounts []uint64 + Gini float64 + KIRAddr common.Address + PoCAddr common.Address + UseGini bool + func (s *StakingInfo) GetIndexByNodeAddress(nodeAddress common.Address) (int, error) + func (s *StakingInfo) GetStakingAmountByNodeId(nodeAddress common.Address) (uint64, error) + type StakingManager struct + func NewStakingManager(bc *blockchain.BlockChain, gh governanceHelper) *StakingManager + func (sm *StakingManager) GetStakingInfo(blockNum uint64) *StakingInfo + func (sm *StakingManager) Subscribe() + func (sm *StakingManager) Unsubscribe()