Correct work restart messages

This commit is contained in:
pooler 2014-05-06 16:21:05 +02:00
parent 8a8e0ad81c
commit 35d8fd82c4

View file

@ -1209,7 +1209,7 @@ start:
} }
if (likely(val)) { if (likely(val)) {
bool rc; bool rc;
applog(LOG_INFO, "LONGPOLL detected new block"); applog(LOG_INFO, "LONGPOLL pushed new work");
res = json_object_get(val, "result"); res = json_object_get(val, "result");
soval = json_object_get(res, "submitold"); soval = json_object_get(res, "submitold");
submit_old = soval ? json_is_true(soval) : false; submit_old = soval ? json_is_true(soval) : false;
@ -1219,8 +1219,6 @@ start:
else else
rc = work_decode(res, &g_work); rc = work_decode(res, &g_work);
if (rc) { if (rc) {
if (opt_debug)
applog(LOG_DEBUG, "DEBUG: got new work");
time(&g_work_time); time(&g_work_time);
restart_threads(); restart_threads();
} }
@ -1324,7 +1322,7 @@ static void *stratum_thread(void *userdata)
time(&g_work_time); time(&g_work_time);
pthread_mutex_unlock(&g_work_lock); pthread_mutex_unlock(&g_work_lock);
if (stratum.job.clean) { if (stratum.job.clean) {
applog(LOG_INFO, "Stratum detected new block"); applog(LOG_INFO, "Stratum requested work restart");
restart_threads(); restart_threads();
} }
} }