Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
MinerCLI Class Reference

#include <MinerAux.h>

Classes

struct  NoWork
 

Public Types

enum  OperationMode { OperationMode::None, OperationMode::DAGInit, OperationMode::Benchmark, OperationMode::Farm }
 

Public Member Functions

 MinerCLI (OperationMode _mode=OperationMode::None)
 
bool interpretOption (int &i, int argc, char **argv)
 
void execute ()
 
std::string minerType () const
 
bool shouldPrecompute () const
 

Static Public Member Functions

static void streamHelp (ostream &_out)
 

Private Member Functions

void doInitDAG (unsigned _n)
 
void doBenchmark (std::string _m, unsigned _warmupDuration=15, unsigned _trialDuration=3, unsigned _trials=5)
 
void doFarm (std::string _m, string const &_remote, unsigned _recheckPeriod)
 

Private Attributes

OperationMode mode
 Operating mode. More...
 
std::string m_minerType = "cpu"
 Mining options. More...
 
unsigned m_miningThreads = UINT_MAX
 
uint64_t m_currentBlock = 0
 
unsigned m_initDAG = 0
 DAG initialisation param. More...
 
unsigned m_benchmarkWarmup = 3
 Benchmarking params. More...
 
unsigned m_benchmarkTrial = 3
 
unsigned m_benchmarkTrials = 5
 
string m_farmURL = "http://127.0.0.1:8545"
 Farm params. More...
 
unsigned m_farmRecheckPeriod = 500
 
bool m_precompute = true
 
bool m_submitHashrate = true
 

Detailed Description

Definition at line 89 of file MinerAux.h.

Member Enumeration Documentation

Enumerator
None 
DAGInit 
Benchmark 
Farm 

Definition at line 92 of file MinerAux.h.

Constructor & Destructor Documentation

MinerCLI::MinerCLI ( OperationMode  _mode = OperationMode::None)
inline

Definition at line 101 of file MinerAux.h.

Member Function Documentation

void MinerCLI::doBenchmark ( std::string  _m,
unsigned  _warmupDuration = 15,
unsigned  _trialDuration = 3,
unsigned  _trials = 5 
)
inlineprivate

Definition at line 278 of file MinerAux.h.

Here is the call graph for this function:

void MinerCLI::doFarm ( std::string  _m,
string const &  _remote,
unsigned  _recheckPeriod 
)
inlineprivate

Definition at line 334 of file MinerAux.h.

Here is the call graph for this function:

void MinerCLI::doInitDAG ( unsigned  _n)
inlineprivate

Definition at line 270 of file MinerAux.h.

Here is the call graph for this function:

void MinerCLI::execute ( )
inline

Definition at line 230 of file MinerAux.h.

Here is the caller graph for this function:

bool MinerCLI::interpretOption ( int &  i,
int  argc,
char **  argv 
)
inline

Definition at line 107 of file MinerAux.h.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string MinerCLI::minerType ( ) const
inline

Definition at line 266 of file MinerAux.h.

Here is the caller graph for this function:

bool MinerCLI::shouldPrecompute ( ) const
inline

Definition at line 267 of file MinerAux.h.

Here is the caller graph for this function:

static void MinerCLI::streamHelp ( ostream &  _out)
inlinestatic

Definition at line 242 of file MinerAux.h.

Here is the caller graph for this function:

Member Data Documentation

unsigned MinerCLI::m_benchmarkTrial = 3
private

Definition at line 455 of file MinerAux.h.

unsigned MinerCLI::m_benchmarkTrials = 5
private

Definition at line 456 of file MinerAux.h.

unsigned MinerCLI::m_benchmarkWarmup = 3
private

Benchmarking params.

Definition at line 454 of file MinerAux.h.

uint64_t MinerCLI::m_currentBlock = 0
private

Definition at line 448 of file MinerAux.h.

unsigned MinerCLI::m_farmRecheckPeriod = 500
private

Definition at line 460 of file MinerAux.h.

string MinerCLI::m_farmURL = "http://127.0.0.1:8545"
private

Farm params.

Definition at line 459 of file MinerAux.h.

unsigned MinerCLI::m_initDAG = 0
private

DAG initialisation param.

Definition at line 451 of file MinerAux.h.

std::string MinerCLI::m_minerType = "cpu"
private

Mining options.

Definition at line 446 of file MinerAux.h.

unsigned MinerCLI::m_miningThreads = UINT_MAX
private

Definition at line 447 of file MinerAux.h.

bool MinerCLI::m_precompute = true
private

Definition at line 461 of file MinerAux.h.

bool MinerCLI::m_submitHashrate = true
private

Definition at line 462 of file MinerAux.h.

OperationMode MinerCLI::mode
private

Operating mode.

Definition at line 443 of file MinerAux.h.


The documentation for this class was generated from the following file: