Documentation ¶
Overview ¶
Package worker implements implements mining, peer updates, and transactions sharing for the blockchain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker manages the POW workflows for the blockchain.
func (*Worker) Shutdown ¶
func (w *Worker) Shutdown()
Shutdown terminates the goroutine performing work.
func (*Worker) SignalCancelMining ¶
func (w *Worker) SignalCancelMining()
SignalCancelMining signals the goroutine executing the runMiningOperation() to stop immediately.
func (*Worker) SignalShareTx ¶
SignalShareTx signals a share transaction operation. If maxTxShareRequests signals exists in the channel, we won't send these.
func (*Worker) SignalStartMining ¶
func (w *Worker) SignalStartMining()
SignalStartMining starts a mining operation. If there is already a signal pending in the channel, return since a mining operation will start.
Click to show internal directories.
Click to hide internal directories.