minerlist

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: GPL-3.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

View Source
const (
	MinerListContract = "0xfffffffffffffffffffffffffffffffff0000002"

	PreQrLength = 97
)

Variables

This section is empty.

Functions

func CalIdTarget

func CalIdTarget(preCoinbase common.Address, preSignatureQr []byte, blockNumber *big.Int, totalMinerNum *big.Int, state *state.StateDB) *big.Int

func CalQrOrIdNext

func CalQrOrIdNext(base []byte, number *big.Int, preQr []byte) (common.Hash, error)

func IsMiner

func IsMiner(statedb *state.StateDB, miner common.Address, totalMinerNum *big.Int) bool

Return whether the miner is legal or not "legal" means the right to participate in mining

func IsPunishedMiner

func IsPunishedMiner(statedb *state.StateDB, miner common.Address, totalMinerNum *big.Int) bool

Return whether the miner is legal or not "legal" means the right to participate in mining

func IsValidMiner

func IsValidMiner(state *state.StateDB, miner common.Address, preCoinbase common.Address, preSignatureQr []byte, blockNumber *big.Int, totalMinerNum *big.Int, offset *big.Int) (bool, int64, int64)

Return whether the miner is valid or not , difficultlevel and preMinerid

func ReadMinerAddress

func ReadMinerAddress(statedb *state.StateDB, offset int64) []byte

func ReadMinerNum

func ReadMinerNum(statedb *state.StateDB) *big.Int

Return the number of miner

Types

This section is empty.

Jump to

Keyboard shortcuts

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