rewardexec

package
v0.0.0-...-ddf2b42 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php

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