Documentation ¶
Overview ¶
Package worker implements mining, peer updates, and transaction 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 G executing the runMiningOperation function to stop immediately.
func (*Worker) SignalShareTx ¶
SignalShareTx signals a share transaction operation. If maxTxShareRequests signals exist 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, just return since a mining operation will start.
Click to show internal directories.
Click to hide internal directories.