|
|
@@ -6305,16 +6305,15 @@ static bool test_work_current(struct work *work)
|
|
|
}
|
|
|
if (work->longpoll)
|
|
|
{
|
|
|
+ struct pool * const cp = current_pool();
|
|
|
++pool->work_restart_id;
|
|
|
update_last_work(work);
|
|
|
- if ((!restart) && pool == current_pool())
|
|
|
- {
|
|
|
- applog(
|
|
|
- (opt_quiet_work_updates ? LOG_DEBUG : LOG_NOTICE),
|
|
|
- "Longpoll from pool %d requested work update",
|
|
|
- pool->pool_no);
|
|
|
+ applog(
|
|
|
+ ((!opt_quiet_work_updates) && pool_actively_in_use(pool, cp) ? LOG_NOTICE : LOG_DEBUG),
|
|
|
+ "Longpoll from pool %d requested work update",
|
|
|
+ pool->pool_no);
|
|
|
+ if ((!restart) && pool == cp)
|
|
|
restart = true;
|
|
|
- }
|
|
|
}
|
|
|
if (restart)
|
|
|
restart_threads();
|
|
|
@@ -8298,12 +8297,13 @@ static void *stratum_thread(void *userdata)
|
|
|
if (test_work_current(work)) {
|
|
|
/* Only accept a work update if this stratum
|
|
|
* connection is from the current pool */
|
|
|
- if (pool == current_pool()) {
|
|
|
+ struct pool * const cp = current_pool();
|
|
|
+ if (pool == cp)
|
|
|
restart_threads();
|
|
|
- applog(
|
|
|
- (opt_quiet_work_updates ? LOG_DEBUG : LOG_NOTICE),
|
|
|
- "Stratum from pool %d requested work update", pool->pool_no);
|
|
|
- }
|
|
|
+
|
|
|
+ applog(
|
|
|
+ ((!opt_quiet_work_updates) && pool_actively_in_use(pool, cp) ? LOG_NOTICE : LOG_DEBUG),
|
|
|
+ "Stratum from pool %d requested work update", pool->pool_no);
|
|
|
} else
|
|
|
applog(LOG_NOTICE, "Stratum from pool %d detected new block", pool->pool_no);
|
|
|
free_work(work);
|