rewardexec

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: MIT Imports: 7 Imported by: 9

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) *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) map[common.Address]*big.Int

func (*BlockReward) CalcRewardMountByNumber

func (br *BlockReward) CalcRewardMountByNumber(blockReward *big.Int, num uint64, halfNum uint64, address 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