|
@@ -1657,8 +1657,7 @@ static bool submit_upstream_work(const struct work *work)
|
|
|
if (isblock)
|
|
if (isblock)
|
|
|
found_blocks++;
|
|
found_blocks++;
|
|
|
hash32 = (uint32_t *)(work->hash);
|
|
hash32 = (uint32_t *)(work->hash);
|
|
|
- sprintf(hashshow, "%08lx.%08lx.%08lx%s",
|
|
|
|
|
- (unsigned long)(hash32[7]), (unsigned long)(hash32[6]), (unsigned long)(hash32[5]),
|
|
|
|
|
|
|
+ sprintf(hashshow, "%08lx.%08lx%s", (unsigned long)(hash32[6]), (unsigned long)(hash32[5]),
|
|
|
isblock ? " BLOCK!" : "");
|
|
isblock ? " BLOCK!" : "");
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
@@ -1675,11 +1674,11 @@ static bool submit_upstream_work(const struct work *work)
|
|
|
applog(LOG_DEBUG, "PROOF OF WORK RESULT: true (yay!!!)");
|
|
applog(LOG_DEBUG, "PROOF OF WORK RESULT: true (yay!!!)");
|
|
|
if (!QUIET) {
|
|
if (!QUIET) {
|
|
|
if (total_pools > 1)
|
|
if (total_pools > 1)
|
|
|
- applog(LOG_NOTICE, "Accepted %s %s %d thread %d pool %d",
|
|
|
|
|
- hashshow, cgpu->api->name, cgpu->device_id, thr_id, work->pool->pool_no);
|
|
|
|
|
|
|
+ applog(LOG_NOTICE, "Accepted %s %s %d pool %d",
|
|
|
|
|
+ hashshow, cgpu->api->name, cgpu->device_id, work->pool->pool_no);
|
|
|
else
|
|
else
|
|
|
- applog(LOG_NOTICE, "Accepted %s %s %d thread %d",
|
|
|
|
|
- hashshow, cgpu->api->name, cgpu->device_id, thr_id);
|
|
|
|
|
|
|
+ applog(LOG_NOTICE, "Accepted %s %s %d",
|
|
|
|
|
+ hashshow, cgpu->api->name, cgpu->device_id);
|
|
|
}
|
|
}
|
|
|
sharelog("accept", work);
|
|
sharelog("accept", work);
|
|
|
if (opt_shares && total_accepted >= opt_shares) {
|
|
if (opt_shares && total_accepted >= opt_shares) {
|
|
@@ -3821,10 +3820,6 @@ static void convert_to_work(json_t *val, bool rolltime, struct pool *pool)
|
|
|
struct work *work, *work_clone;
|
|
struct work *work, *work_clone;
|
|
|
bool rc;
|
|
bool rc;
|
|
|
|
|
|
|
|
- /* Don't use as work if we have failover-only enabled */
|
|
|
|
|
- if (pool != cp && opt_fail_only)
|
|
|
|
|
- return;
|
|
|
|
|
-
|
|
|
|
|
work = make_work();
|
|
work = make_work();
|
|
|
|
|
|
|
|
rc = work_decode(json_object_get(val, "result"), work);
|
|
rc = work_decode(json_object_get(val, "result"), work);
|
|
@@ -3846,6 +3841,12 @@ static void convert_to_work(json_t *val, bool rolltime, struct pool *pool)
|
|
|
* allows testwork to know whether LP discovered the block or not. */
|
|
* allows testwork to know whether LP discovered the block or not. */
|
|
|
test_work_current(work);
|
|
test_work_current(work);
|
|
|
|
|
|
|
|
|
|
+ /* Don't use as work if we have failover-only enabled */
|
|
|
|
|
+ if (pool != cp && opt_fail_only) {
|
|
|
|
|
+ free_work(work);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
work_clone = make_work();
|
|
work_clone = make_work();
|
|
|
memcpy(work_clone, work, sizeof(struct work));
|
|
memcpy(work_clone, work, sizeof(struct work));
|
|
|
while (reuse_work(work)) {
|
|
while (reuse_work(work)) {
|
|
@@ -3912,6 +3913,9 @@ retry_pool:
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /* Any longpoll from any pool is enough for this to be true */
|
|
|
|
|
+ have_longpoll = true;
|
|
|
|
|
+
|
|
|
if (cp == pool)
|
|
if (cp == pool)
|
|
|
applog(LOG_WARNING, "Long-polling activated for %s", pool->lp_url);
|
|
applog(LOG_WARNING, "Long-polling activated for %s", pool->lp_url);
|
|
|
else
|
|
else
|