Home Reference Source
public class | source

InterfaceBlockchainMiningBasic

Constructor Summary

Public Constructor
public

Member Summary

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

Method Summary

Public Methods
public

async loadMinerAddress(defaultAddress: *, Wallet: *): boolean

public

async mineNextBlock(suspend: *)

public
public

async saveMinerAddress(minerAddress: *): boolean

public

async startMining()

public
Private Methods
private
private

_setAddress(newAddress: *, save: boolean): *

private

Public Constructors

public constructor() source

Public Members

public blockchain: * source

public get minerAddress: * source

public set minerAddress source

public set miningFeePerByte source

public get miningFeePerByte: * source

public reset: boolean source

public resetForced: boolean source

public started: boolean source

public get unencodedMinerAddress: * source

public useResetConsensus: boolean source

public walletDB: * source

Private Members

private _hashesPerSecond: number source

private _intervalMiningOutput: * source

private _intervalPerMinute: boolean source

private _minerAddress: * source

private _miningFeePerByte: * source

private _nonce: number source

private _unencodedMinerAddress: * source

Public Methods

public async loadMinerAddress(defaultAddress: *, Wallet: *): boolean source

Params:

NameTypeAttributeDescription
defaultAddress *
Wallet *

Return:

boolean

public async mineNextBlock(suspend: *) source

Params:

NameTypeAttributeDescription
suspend *

public resetMining() source

public async saveMinerAddress(minerAddress: *): boolean source

Params:

NameTypeAttributeDescription
minerAddress *

Return:

boolean

public async startMining() source

public stopMining() source

Private Methods

private _destroyMiningInterval() source

private _setAddress(newAddress: *, save: boolean): * source

Params:

NameTypeAttributeDescription
newAddress *
save boolean
  • optional
  • default: true

Return:

*

private _startMiningHashRateInterval() source