mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Merge branch 'master' into usb-dev
This commit is contained in:
commit
b2b0d10a00
@ -3725,6 +3725,7 @@ static void stage_work(struct work *work)
|
|||||||
{
|
{
|
||||||
applog(LOG_DEBUG, "Pushing work from pool %d to hash queue", work->pool->pool_no);
|
applog(LOG_DEBUG, "Pushing work from pool %d to hash queue", work->pool->pool_no);
|
||||||
work->work_block = work_block;
|
work->work_block = work_block;
|
||||||
|
work->pool->last_work_time = time(NULL);
|
||||||
test_work_current(work);
|
test_work_current(work);
|
||||||
hash_push(work);
|
hash_push(work);
|
||||||
}
|
}
|
||||||
@ -4760,6 +4761,10 @@ static bool cnx_needed(struct pool *pool)
|
|||||||
return true;
|
return true;
|
||||||
if (!cp->has_gbt && !cp->has_stratum && (!opt_fail_only || !cp->hdr_path))
|
if (!cp->has_gbt && !cp->has_stratum && (!opt_fail_only || !cp->hdr_path))
|
||||||
return true;
|
return true;
|
||||||
|
/* Keep the connection open to allow any stray shares to be submitted
|
||||||
|
* on switching pools for 2 minutes. */
|
||||||
|
if (time(NULL) < pool->last_work_time + 120)
|
||||||
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
miner.h
1
miner.h
@ -970,6 +970,7 @@ struct pool {
|
|||||||
pthread_cond_t cr_cond;
|
pthread_cond_t cr_cond;
|
||||||
struct list_head curlring;
|
struct list_head curlring;
|
||||||
|
|
||||||
|
time_t last_work_time;
|
||||||
time_t last_share_time;
|
time_t last_share_time;
|
||||||
double last_share_diff;
|
double last_share_diff;
|
||||||
uint64_t best_diff;
|
uint64_t best_diff;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user