Documentation ¶
Index ¶
Constants ¶
const ( OFF uint32 = iota ON )
const RoundsPerAlgo = 1
Variables ¶
This section is empty.
Functions ¶
func UpdateExtraNonce ¶
UpdateExtraNonce updates the extra nonce in the coinbase script of the passed block by regenerating the coinbase script with the passed value and block height. It also recalculates and updates the new merkle root that results from changing the coinbase script.
Types ¶
type Counter ¶
func NewCounter ¶
NewCounter returns an initialized algorithm rolling counter that ensures each miner does equal amounts of every algorithm
func (*Counter) GetAlgoVer ¶
GetAlgoVer returns the next algo version based on the current configuration
type Worker ¶
type Worker struct { Quit chan struct{} // contains filtered or unexported fields }
func New ¶
New initialises the state for a worker, loading the work function handler that runs a round of processing between checking quit signal and work semaphore
func NewWithConnAndSemaphore ¶
NewWithConnAndSemaphore is exposed to enable use an actual network connection while retaining the same RPC API to allow a worker to be configured to run on a bare metal system with a different launcher main
func (*Worker) NewJob ¶
NewJob is a delivery of a new job for the worker, this makes the miner start mining from pause or pause, prepare the work and restart
func (*Worker) Pause ¶
Pause signals the worker to stop working, releases its semaphore and the worker is then idle