import Workers from 'node-webdollar/src/common/blockchain/interface-blockchain/mining/backbone/Workers.js'
Workers
Constructor Summary
Public Constructor | ||
public |
|
Member Summary
Public Members | ||
public |
block: * |
|
public |
blockId: * |
|
public |
difficulty: * |
|
public |
height: * |
|
public |
ibb: * |
|
public |
|
|
public |
worker_batch: * |
|
public |
|
|
public |
workers_list: *[] |
|
public |
workers_max: * |
Private Members | ||
private |
|
|
private |
_current: * |
|
private |
_current_max: * |
|
private |
|
|
private |
|
|
private |
_from_pool: * |
|
private |
_loopTimeout: * |
|
private |
|
|
private |
_silent: * |
|
private |
_worker_path: * |
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
|
|
public |
max(): * |
|
public |
|
|
public |
|
Private Methods | ||
private |
async _createWorker(index: *): * |
|
private |
async _initializeWorker(index: *) |
|
private |
async _initiateWorkers(): * |
|
private |
|
|
private |
async _makeUnresponsiveThreads() |
|
private |
_maxWorkersDefault(): * |
|
private |
_stop() |
|
private |
_stopAndResolve(result: boolean, hash: *, nonce: *): * |
|
private |
async _validateHash(initialHash: *, nonce: *): boolean |
Public Constructors
public constructor(ibb: BlockchainBackboneMining): Workers source
Params:
Name | Type | Attribute | Description |
ibb | BlockchainBackboneMining |
Public Members
public block: * source
public blockId: * source
public difficulty: * source
public height: * source
public ibb: * source
public makeUnresponsiveThreadsTimeout: * source
public worker_batch: * source
public worker_batch_thread: * source
public workers_list: *[] source
public workers_max: * source
Private Members
private _current: * source
private _current_max: * source
private _from_pool: * source
private _loopTimeout: * source
private _silent: * source
private _worker_path: * source
Public Methods
public async run(start: *, end: *, loop_delay: number) source
Params:
Name | Type | Attribute | Description |
start | * | ||
end | * | ||
loop_delay | number |
|
public stopMining() source
Private Methods
private async _createWorker(index: *): * source
Params:
Name | Type | Attribute | Description |
index | * |
Return:
* |
private async _initializeWorker(index: *) source
Params:
Name | Type | Attribute | Description |
index | * |