mineroutreward

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: 11 Imported by: 5

Documentation

Index

Constants

View Source
const (
	PackageName = "矿工挖矿奖励"
)

Variables

This section is empty.

Functions

func SetPreMinerReward added in v1.1.3

func SetPreMinerReward(state util.StateDB, reward *big.Int, rewardType uint8, coinType string)

Types

type ChainReader

type ChainReader interface {
	// Config retrieves the blockchain's chain configuration.
	Config() *params.ChainConfig

	// CurrentHeader retrieves the current header from the local chain.
	CurrentHeader() *types.Header

	// GetHeader retrieves a block header from the database by hash and number.
	GetHeader(hash []common.CoinRoot, number uint64) *types.Header

	// GetHeaderByNumber retrieves a block header from the database by number.
	GetHeaderByNumber(number uint64) *types.Header

	// GetHeaderByHash retrieves a block header from the database by its hash.
	GetHeaderByHash(hash []common.CoinRoot) *types.Header

	GetBlockByNumber(number uint64) *types.Block

	// GetBlock retrieves a block sfrom the database by hash and number.
	GetBlock(hash []common.CoinRoot, number uint64) *types.Block
	StateAt(root []common.CoinRoot) (*state.StateDBManage, error)
	State() (*state.StateDBManage, error)
}

type MinerOutReward

type MinerOutReward struct {
	PreReward   []mc.MultiCoinMinerOutReward
	InnerMiners []common.Address
	RewardType  uint8
}

func (*MinerOutReward) SetMinerOutRewards

func (mr *MinerOutReward) SetMinerOutRewards(curReward *big.Int, state util.StateDB, num uint64, parentHash common.Hash, reader util.ChainReader, coinType string) map[common.Address]*big.Int

Jump to

Keyboard shortcuts

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