Home Reference Source
public class | source

InterfaceBlockchainMiningWorkersList

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

block: *

public
public

mining: *

public
Private Members
private
private

Method Summary

Public Methods
public

addWorkers(number: *): boolean

public
public
public
public

initializeWorkers(block: *, difficultyTarget: *)

public
public

suspendWorker(worker: *)

public
public

terminateWorker(worker: *)

public
Private Methods
private

_initializeWorker(worker: *)

private
private

Public Constructors

public constructor() source

Public Members

public WORKERS_MAX: number source

public block: * source

public difficultyTarget: * source

public mining: * source

public workers: number source

Private Members

private _id: number source

private _workersList: *[] source

Public Methods

public addWorkers(number: *): boolean source

Params:

NameTypeAttributeDescription
number *

Return:

boolean

public createWorker(): * source

Return:

*

public createWorkers() source

public decreaseWorkers() source

public initializeWorkers(block: *, difficultyTarget: *) source

Params:

NameTypeAttributeDescription
block *
difficultyTarget *

public reduceWorkers() source

public suspendWorker(worker: *) source

Params:

NameTypeAttributeDescription
worker *

public suspendWorkers() source

public terminateWorker(worker: *) source

Params:

NameTypeAttributeDescription
worker *

public terminateWorkers() source

Private Methods

private _initializeWorker(worker: *) source

Params:

NameTypeAttributeDescription
worker *

private _initializeWorkerFirstTime(worker: *) source

Params:

NameTypeAttributeDescription
worker *

private _makeUnworkingWorkersToWork(): boolean source

Return:

boolean