Browse Source

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

nfactor-troky
Con Kolivas 14 years ago
parent
commit
55695066b6
  1. 8
      main.c

8
main.c

@ -997,10 +997,10 @@ static void *stage_thread(void *userdata) @@ -997,10 +997,10 @@ static void *stage_thread(void *userdata)
if (likely(strncmp(current_block, blank, 36))) {
if (unlikely(strncmp(hexstr, current_block, 36))) {
new_blocks++;
if (want_longpoll)
applog(LOG_WARNING, "New block detected on network before receiving longpoll, flushing work queue");
if (have_longpoll)
applog(LOG_WARNING, "New block detected on network before longpoll, waiting on fresh work");
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
* the wakeup thread to restart all the
* threads */
@ -1836,7 +1836,7 @@ static void *longpoll_thread(void *userdata) @@ -1836,7 +1836,7 @@ static void *longpoll_thread(void *userdata)
if (likely(!strncmp(longpoll_block, blank, 36) ||
!strncmp(longpoll_block, current_block, 36))) {
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);
} else
applog(LOG_WARNING, "LONGPOLL received after new block already detected");

Loading…
Cancel
Save