spow

package
v0.0.0-...-3e4d930 Latest Latest
Warning

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

Go to latest
Published: May 4, 2019 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

func (*API) GetThreads

func (api *API) GetThreads() int

GetThreads returns the thread number of the miner engine

type HashItem

type HashItem struct {
	//Hash  common.Hash
	Slice uint64
	Nonce uint64
}

type SpowEngine

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

Engine provides the consensus operations based on SPOW.

func NewSpowEngine

func NewSpowEngine(threads int, folder string) *SpowEngine

func (*SpowEngine) APIs

func (engine *SpowEngine) APIs(chain consensus.ChainReader) []rpc.API

func (*SpowEngine) MSeal

func (engine *SpowEngine) MSeal(reader consensus.ChainReader, block *types.Block, stop <-chan struct{}, results chan<- *types.Block) error

func (*SpowEngine) MStartMining

func (engine *SpowEngine) MStartMining(block *types.Block, seed uint64, min uint64, max uint64, result chan<- *types.Block, abort <-chan struct{},
	isNonceFound *int32, once *sync.Once, hashrate metrics.Meter, log *log.SeeleLog)

func (*SpowEngine) Prepare

func (engine *SpowEngine) Prepare(reader consensus.ChainReader, header *types.BlockHeader) error

func (*SpowEngine) Seal

func (engine *SpowEngine) Seal(reader consensus.ChainReader, block *types.Block, stop <-chan struct{}, results chan<- *types.Block) error

func (*SpowEngine) SetThreads

func (engine *SpowEngine) SetThreads(threads int)

func (*SpowEngine) VerifyHeader

func (engine *SpowEngine) VerifyHeader(reader consensus.ChainReader, header *types.BlockHeader) error

ValidateHeader validates the specified header and returns error if validation failed.

Jump to

Keyboard shortcuts

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