Add compile flag to disable compilation of mining code
This commit is contained in:
@@ -128,6 +128,7 @@ int printNetworkStats()
|
||||
|
||||
int printMiningStatus(bool mining)
|
||||
{
|
||||
#ifdef ENABLE_MINING
|
||||
// Number of lines that are always displayed
|
||||
int lines = 1;
|
||||
|
||||
@@ -151,6 +152,9 @@ int printMiningStatus(bool mining)
|
||||
std::cout << std::endl;
|
||||
|
||||
return lines;
|
||||
#else // ENABLE_MINING
|
||||
return 0;
|
||||
#endif // !ENABLE_MINING
|
||||
}
|
||||
|
||||
int printMetrics(size_t cols, bool mining)
|
||||
@@ -342,7 +346,11 @@ void ThreadShowMetricsScreen()
|
||||
}
|
||||
|
||||
// Miner status
|
||||
#ifdef ENABLE_MINING
|
||||
bool mining = GetBoolArg("-gen", false);
|
||||
#else
|
||||
bool mining = false;
|
||||
#endif
|
||||
|
||||
if (loaded) {
|
||||
lines += printNetworkStats();
|
||||
|
||||
Reference in New Issue
Block a user