1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-23 13:04:29 +00:00

Display appropriate messages with/without longpoll to make it clear if stalls happen that cgminer is waiting on more work.

This commit is contained in:
Con Kolivas 2011-07-16 01:57:04 +10:00
parent 3785e50d3f
commit 55695066b6

8
main.c
View File

@ -997,10 +997,10 @@ static void *stage_thread(void *userdata)
if (likely(strncmp(current_block, blank, 36))) { if (likely(strncmp(current_block, blank, 36))) {
if (unlikely(strncmp(hexstr, current_block, 36))) { if (unlikely(strncmp(hexstr, current_block, 36))) {
new_blocks++; new_blocks++;
if (want_longpoll) if (have_longpoll)
applog(LOG_WARNING, "New block detected on network before receiving longpoll, flushing work queue"); applog(LOG_WARNING, "New block detected on network before longpoll, waiting on fresh work");
else else
applog(LOG_WARNING, "New block detected on network, flushing work queue"); applog(LOG_WARNING, "New block detected on network, waiting on fresh work");
/* As we can't flush the work from here, signal /* As we can't flush the work from here, signal
* the wakeup thread to restart all the * the wakeup thread to restart all the
* threads */ * threads */
@ -1836,7 +1836,7 @@ static void *longpoll_thread(void *userdata)
if (likely(!strncmp(longpoll_block, blank, 36) || if (likely(!strncmp(longpoll_block, blank, 36) ||
!strncmp(longpoll_block, current_block, 36))) { !strncmp(longpoll_block, current_block, 36))) {
new_blocks++; new_blocks++;
applog(LOG_WARNING, "LONGPOLL detected new block on network, flushing work queue"); applog(LOG_WARNING, "LONGPOLL detected new block on network, waiting on fresh work");
restart_threads(true); restart_threads(true);
} else } else
applog(LOG_WARNING, "LONGPOLL received after new block already detected"); applog(LOG_WARNING, "LONGPOLL received after new block already detected");