Documentation ¶
Overview ¶
Package consensus implements the czz consensus engine.
Index ¶
- Constants
- func CZZhashFull(hash []byte, nonce uint64) []byte
- func DisableLog()
- func HashCZZ(header []byte, nonce uint64) []byte
- func MatMuliple(input []uint64, output []uint64, pmat []uint64) int
- func MineBlock(conf *MiningParam) (uint64, bool)
- func UseLogger(logger czzlog.Logger)
- func VerifyBlockSeal(Info *CzzConsensusParam, nonce uint64) error
- type CZZTBL
- type CzzConsensusParam
- type MiningParam
Constants ¶
View Source
const TBLSize = 8388608
Variables ¶
This section is empty.
Functions ¶
func CZZhashFull ¶
CZZhashFull aggregates data from the full dataset (using the full in-memory dataset) in order to produce our final value for a particular header hash and nonce.
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
func MineBlock ¶
func MineBlock(conf *MiningParam) (uint64, bool)
func VerifyBlockSeal ¶
func VerifyBlockSeal(Info *CzzConsensusParam, nonce uint64) error
Types ¶
type MiningParam ¶
type MiningParam struct { Info *CzzConsensusParam MinerID int Begin uint64 Loops uint64 Done uint64 Abort chan struct{} }
Click to show internal directories.
Click to hide internal directories.