Documentation ¶
Index ¶
- Constants
- func CalIdTarget(preCoinbase common.Address, preSignatureQr []byte, blockNumber *big.Int, ...) *big.Int
- func CalQrOrIdNext(base []byte, number *big.Int, preQr []byte) (common.Hash, error)
- func GetMisconducts(statedb *state.StateDB, miner common.Address) *big.Int
- func GetPunishHeight(statedb *state.StateDB, miner common.Address) *big.Int
- func IsMiner(statedb *state.StateDB, miner common.Address, totalMinerNum *big.Int, ...) (bool, int)
- func IsPunishedMiner(statedb *state.StateDB, miner common.Address, totalMinerNum *big.Int, ...) bool
- func IsValidMiner(state *state.StateDB, miner common.Address, preCoinbase common.Address, ...) (bool, int64, int64)
- func ReadMinerAddress(statedb *state.StateDB, offset int64) []byte
- func ReadMinerNum(statedb *state.StateDB) *big.Int
Constants ¶
View Source
const ( MinerListContract = "UmixYUgBHA9vJj47myQKn8uZAm4anEfrG78" PreQrLength = 97 )
Variables ¶
This section is empty.
Functions ¶
func CalIdTarget ¶
func CalQrOrIdNext ¶
func IsMiner ¶
func IsMiner(statedb *state.StateDB, miner common.Address, totalMinerNum *big.Int, blockNumber *big.Int) (bool, int)
Return whether the miner is legal or not "legal" means the right to participate in mining Not whether the miners are online but whether the miners are being punished 0 means miners, 1 means punished, 2 means not on the miners' list
func IsPunishedMiner ¶
func IsPunishedMiner(statedb *state.StateDB, miner common.Address, totalMinerNum *big.Int, blockNumber *big.Int) bool
Return whether the miner is legal or not "legal" means the right to participate in mining
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.