rewardexec

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PackageName = "奖励"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockReward

type BlockReward struct {
	// contains filtered or unexported fields
}

func New

func New(chain util.ChainReader, rewardCfg *cfg.RewardCfg, st util.StateDB, interval *mc.BCIntervalInfo, foundationAccount common.Address, top *mc.TopologyGraph, elect *mc.ElectGraph) *BlockReward

func (*BlockReward) CalcMinerRateMount

func (br *BlockReward) CalcMinerRateMount(blockReward *big.Int) (*big.Int, *big.Int, *big.Int)

func (*BlockReward) CalcMinerRewards

func (br *BlockReward) CalcMinerRewards(num uint64, parentHash common.Hash) map[common.Address]*big.Int

func (*BlockReward) CalcNodesRewards

func (br *BlockReward) CalcNodesRewards(blockReward *big.Int, Leader common.Address, num uint64, parentHash common.Hash, coinType string) map[common.Address]*big.Int

func (*BlockReward) CalcValidatorRateMount

func (br *BlockReward) CalcValidatorRateMount(blockReward *big.Int) (*big.Int, *big.Int, *big.Int)

func (*BlockReward) CalcValidatorRewards

func (br *BlockReward) CalcValidatorRewards(Leader common.Address, num uint64) map[common.Address]*big.Int

func (*BlockReward) GetRewardCfg

func (br *BlockReward) GetRewardCfg() *cfg.RewardCfg

Jump to

Keyboard shortcuts

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