Home Reference Source
public class | source

PoolManagement

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public set
public get
public set
public get
public
public
public
public
public get
public
public
Private Members
private
private
private

Method Summary

Public Methods
public

generatePoolWork(minerInstance: *): *

public

async initializePoolManagement(poolFee: *): *

public

receivePoolWork(minerInstance: *, work: *): *

public

Send rewards for miners and reset rewards from storage

public

async setPoolStarted(value: *, forceStartPool: boolean)

public

async startPool(forceStartPool: boolean): boolean

public

updateRewards(newReward: *): *

Update rewards for all miners.

Public Constructors

public constructor() source

Public Members

public blockchain: * source

public poolData: * source

public set poolInitialized source

public get poolInitialized: * source

public set poolOpened source

public get poolOpened: * source

public poolProtocol: * source

public poolRemainingRewards: * source

public poolRewardsManagement: * source

public poolSettings: * source

public get poolStarted: * source

public poolStatistics: * source

public poolWorkManagement: * source

Private Members

private _poolInitialized: boolean source

private _poolOpened: boolean source

private _poolStarted: boolean source

Public Methods

public generatePoolWork(minerInstance: *): * source

Params:

NameTypeAttributeDescription
minerInstance *

Return:

*

public async initializePoolManagement(poolFee: *): * source

Params:

NameTypeAttributeDescription
poolFee *

Return:

*

public receivePoolWork(minerInstance: *, work: *): * source

Params:

NameTypeAttributeDescription
minerInstance *
work *

Return:

*

public sendRewardsToMiners(): * source

Send rewards for miners and reset rewards from storage

Return:

*

public async setPoolStarted(value: *, forceStartPool: boolean) source

Params:

NameTypeAttributeDescription
value *
forceStartPool boolean
  • optional
  • default: false

public async startPool(forceStartPool: boolean): boolean source

Params:

NameTypeAttributeDescription
forceStartPool boolean
  • optional
  • default: false

Return:

boolean

public updateRewards(newReward: *): * source

Update rewards for all miners. This function must be called at every block reward

Params:

NameTypeAttributeDescription
newReward *

is the total new reward of the pool

Return:

*