miner

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RemoteMiner

type RemoteMiner struct {
	// IP:PORT or DOMAIN:PORT of the remote node used to get block templates and to
	// submit blocks.
	RemoteNode string

	// The public key of the miner
	PublicKeyBase58Check string

	NumThreads         int64
	IterationsPerCycle int64
	// How many seconds we wait before asking the BlockProducer for a fresh set of
	// templates.
	TemplateRefreshIntervalSeconds float64
	// contains filtered or unexported fields
}

func NewRemoteMiner

func NewRemoteMiner(
	remoteNode string, publicKeyBase58Check string, _numThreads int64, iterationsPerCycle int64,
	templateRefreshIntervalSeconds float64) *RemoteMiner

func (*RemoteMiner) GetBlockTemplate

func (bb *RemoteMiner) GetBlockTemplate(threadIndex int64) (
	_hdr *lib.MsgDeSoHeader, _extraNonce uint64, _blockID string, _diffTarget *lib.BlockHash)

func (*RemoteMiner) RefreshBlockTemplates

func (bb *RemoteMiner) RefreshBlockTemplates() error

func (*RemoteMiner) Start

func (bb *RemoteMiner) Start()

func (*RemoteMiner) SubmitWinningHeader

func (bb *RemoteMiner) SubmitWinningHeader(
	header *lib.MsgDeSoHeader, extraData uint64, blockID string) error

type SingleThread

type SingleThread struct {
	ThreadIndex        int64
	RemoteMiner        *RemoteMiner
	IterationsPerCycle int64
}

func NewSingleThread

func NewSingleThread(threadIndex int64, RemoteMiner *RemoteMiner,
	iterationsPerCycle int64) *SingleThread

func (*SingleThread) Loop

func (ss *SingleThread) Loop()

Jump to

Keyboard shortcuts

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