mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 13:04:29 +00:00
Use the current pool when deciding whether to reuse work from a stratum source rather than the work's previous pool.
This commit is contained in:
parent
6174c80678
commit
e93f679ae4
@ -4370,11 +4370,11 @@ static struct work *hash_pop(const struct timespec *abstime)
|
|||||||
return work;
|
return work;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool reuse_work(struct work *work)
|
static bool reuse_work(struct work *work, struct pool *pool)
|
||||||
{
|
{
|
||||||
if (work->stratum && !work->pool->idle) {
|
if (pool->has_stratum) {
|
||||||
applog(LOG_DEBUG, "Reusing stratum work");
|
applog(LOG_DEBUG, "Reusing stratum work");
|
||||||
gen_stratum_work(work->pool, work);;
|
gen_stratum_work(pool, work);;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4545,7 +4545,7 @@ static void get_work(struct work *work, struct thr_info *thr, const int thr_id)
|
|||||||
retry:
|
retry:
|
||||||
pool = current_pool();
|
pool = current_pool();
|
||||||
|
|
||||||
if (reuse_work(work))
|
if (reuse_work(work, pool))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!pool->lagging && !total_staged() && global_queued() >= mining_threads + opt_queue) {
|
if (!pool->lagging && !total_staged() && global_queued() >= mining_threads + opt_queue) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user