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)
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");

Loading…
Cancel
Save