consensus

package
v3.1.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: ISC Imports: 9 Imported by: 0

Documentation

Overview

Package consensus implements the czz consensus engine.

Index

Constants

View Source
const TBLSize = 8388608

Variables

This section is empty.

Functions

func CZZhashFull

func CZZhashFull(hash []byte, nonce uint64) []byte

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 HashCZZ

func HashCZZ(header []byte, nonce uint64) []byte

func MatMuliple

func MatMuliple(input []uint64, output []uint64, pmat []uint64) int

func MineBlock

func MineBlock(conf *MiningParam) (uint64, bool)

func UseLogger

func UseLogger(logger czzlog.Logger)

UseLogger uses a specified Logger to output package logging info.

func VerifyBlockSeal

func VerifyBlockSeal(Info *CzzConsensusParam, nonce uint64) error

Types

type CZZTBL

type CZZTBL struct {
	// contains filtered or unexported fields
}

type CzzConsensusParam

type CzzConsensusParam struct {
	HeadHash chainhash.Hash
	Target   *big.Int
}

type MiningParam

type MiningParam struct {
	Info    *CzzConsensusParam
	MinerID int
	Begin   uint64
	Loops   uint64
	Done    uint64
	Abort   chan struct{}
}

Jump to

Keyboard shortcuts

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