mirror of
https://github.com/JayDDee/cpuminer-opt.git
synced 2026-02-23 00:43:08 +00:00
v3.16.3
This commit is contained in:
29
cpu-miner.c
29
cpu-miner.c
@@ -1145,7 +1145,7 @@ void report_summary_log( bool force )
|
||||
if ( mismatch )
|
||||
{
|
||||
if ( mismatch != 1 )
|
||||
applog(LOG_WARNING,"Share count mismatch: %d, stats may be incorrect", mismatch );
|
||||
applog(LOG_WARNING,"Share count mismatch: %d, stats may be inaccurate", mismatch );
|
||||
else
|
||||
applog(LOG_INFO,"Share count mismatch, submitted share may still be pending" );
|
||||
}
|
||||
@@ -2171,11 +2171,11 @@ static void *miner_thread( void *userdata )
|
||||
/* Set worker threads to nice 19 and then preferentially to SCHED_IDLE
|
||||
* and if that fails, then SCHED_BATCH. No need for this to be an
|
||||
* error if it fails */
|
||||
if (!opt_benchmark && opt_priority == 0)
|
||||
if ( !opt_priority )
|
||||
{
|
||||
setpriority(PRIO_PROCESS, 0, 19);
|
||||
if ( !thr_id && !opt_quiet )
|
||||
applog(LOG_INFO, "Miner thread priority %d (nice 19)", opt_priority );
|
||||
if ( !thr_id && opt_debug )
|
||||
applog(LOG_INFO, "Default miner thread priority %d (nice 19)", opt_priority );
|
||||
drop_policy();
|
||||
}
|
||||
else
|
||||
@@ -2192,9 +2192,12 @@ static void *miner_thread( void *userdata )
|
||||
case 4: prio = -10; break;
|
||||
case 5: prio = -15;
|
||||
}
|
||||
if ( !( thr_id || opt_quiet ) )
|
||||
applog( LOG_INFO, "Miner thread priority %d (nice %d)",
|
||||
if ( !thr_id )
|
||||
{
|
||||
applog( LOG_INFO, "User set miner thread priority %d (nice %d)",
|
||||
opt_priority, prio );
|
||||
applog( LOG_WARNING, "High priority mining threads may cause system instability");
|
||||
}
|
||||
#endif
|
||||
setpriority(PRIO_PROCESS, 0, prio);
|
||||
if ( opt_priority == 0 )
|
||||
@@ -2439,7 +2442,7 @@ static void *miner_thread( void *userdata )
|
||||
char hr_units[2] = {0,0};
|
||||
scale_hash_for_display( &hashrate, hr_units );
|
||||
sprintf( hr, "%.2f", hashrate );
|
||||
#if ((defined(_WIN64) || defined(__WINDOWS__)) || defined(_WIN32))
|
||||
#if (defined(_WIN64) || defined(__WINDOWS__) || defined(_WIN32))
|
||||
applog( LOG_NOTICE, "Total: %s %sH/s", hr, hr_units );
|
||||
#else
|
||||
float lo_freq = 0., hi_freq = 0.;
|
||||
@@ -2739,10 +2742,10 @@ static void *stratum_thread(void *userdata )
|
||||
stratum.url = strdup( rpc_url );
|
||||
applog(LOG_BLUE, "Connection changed to %s", short_url);
|
||||
}
|
||||
else // if ( !opt_quiet )
|
||||
else
|
||||
applog(LOG_WARNING, "Stratum connection reset");
|
||||
// reset stats queue as well
|
||||
s_get_ptr = s_put_ptr = 0;
|
||||
if ( s_get_ptr != s_put_ptr ) s_get_ptr = s_put_ptr = 0;
|
||||
}
|
||||
|
||||
while ( !stratum.curl )
|
||||
@@ -2789,13 +2792,15 @@ static void *stratum_thread(void *userdata )
|
||||
else
|
||||
{
|
||||
applog(LOG_WARNING, "Stratum connection interrupted");
|
||||
stratum_disconnect( &stratum );
|
||||
// stratum_disconnect( &stratum );
|
||||
stratum_need_reset = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
applog(LOG_ERR, "Stratum connection timeout");
|
||||
stratum_disconnect( &stratum );
|
||||
stratum_need_reset = true;
|
||||
// stratum_disconnect( &stratum );
|
||||
}
|
||||
|
||||
} // loop
|
||||
@@ -3394,8 +3399,6 @@ void parse_arg(int key, char *arg )
|
||||
v = atoi(arg);
|
||||
if (v < 0 || v > 5) /* sanity check */
|
||||
show_usage_and_exit(1);
|
||||
// option is deprecated, show warning
|
||||
applog( LOG_WARNING, "High priority mining threads may cause system instability");
|
||||
opt_priority = v;
|
||||
break;
|
||||
case 'N': // N parameter for various scrypt algos
|
||||
|
||||
Reference in New Issue
Block a user