Documentation ¶
Index ¶
Constants ¶
const RoundsPerAlgo = 100
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter struct { C atomic.Int32 Algos atomic.Value // []int32 RoundsPerAlgo atomic.Int32 // contains filtered or unexported fields }
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 {
// 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