Constructor Summary
Public Constructor | ||
public |
constructor(blockchain: BaseChain, accounts: Accounts, mempool: Mempool, time: Time, minerAddress: Address, extraData: Uint8Array) |
Member Summary
Public Members | ||
public get |
|
|
public set |
|
|
public set |
extraData: Uint8Array |
|
public get |
extraData: Uint8Array |
|
public get |
hashrate: number |
|
public get |
numBlocksMined: number |
|
public get |
shareCompact: * |
|
public set |
shareCompact: number |
|
public set |
threads(threads: number) |
|
public get |
threads: number |
|
public get |
throttleAfter: number |
|
public set |
throttleAfter(throttleAfter: number) |
|
public get |
throttleWait: number |
|
public set |
throttleWait(throttleWait: number) |
|
public get |
working: boolean |
Protected Members | ||
protected |
|
Method Summary
Public Methods | ||
public |
|
|
public |
async getNextBlock(address: Address, extraData: Uint8Array): Promise<Block> |
|
public |
async onWorkerShare(obj: {hash: Hash, nonce: number, block: Block}) |
|
public |
|
|
public |
|
|
public |
stopWork() |
Inherited Summary
From class Observable | ||
public static get |
WILDCARD: string: string |
|
public |
bubble(observable: Observable, types: ...string) |
|
public |
fire(type: string, args: ...*): Promise |
|
public |
off(type: string, id: number) |
|
public |
on(type: string, callback: Function): number |
Public Constructors
Public Members
public set extraData: Uint8Array source
public get extraData: Uint8Array source
public get hashrate: number source
public get numBlocksMined: number source
public get shareCompact: * source
public set shareCompact: number source
public set threads(threads: number) source
public get threads: number source
public get throttleAfter: number source
public set throttleAfter(throttleAfter: number) source
public get throttleWait: number source
public set throttleWait(throttleWait: number) source
public get working: boolean source
Protected Members
protected _producer: BlockProducer source
Public Methods
public finishConfigChanges() source
public async getNextBlock(address: Address, extraData: Uint8Array): Promise<Block> source
Params:
Name | Type | Attribute | Description |
address | Address |
|
|
extraData | Uint8Array |
|