mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-14 15:11:56 +00:00
Make expiry on should_roll to 2/3 time instead of share duration since some hardware will have very fast share times.
This commit is contained in:
parent
8697d6a2ce
commit
83b9ddfea4
@ -2290,18 +2290,16 @@ static bool stale_work(struct work *work, bool share);
|
|||||||
static inline bool should_roll(struct work *work)
|
static inline bool should_roll(struct work *work)
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
double share_time;
|
|
||||||
time_t expiry;
|
time_t expiry;
|
||||||
|
|
||||||
if (work->pool != current_pool() && pool_strategy != POOL_LOADBALANCE)
|
if (work->pool != current_pool() && pool_strategy != POOL_LOADBALANCE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
share_time = total_secs * mining_threads / (total_accepted + 1);
|
|
||||||
if (work->rolltime > opt_scantime)
|
if (work->rolltime > opt_scantime)
|
||||||
expiry = work->rolltime;
|
expiry = work->rolltime;
|
||||||
else
|
else
|
||||||
expiry = opt_scantime;
|
expiry = opt_scantime;
|
||||||
expiry -= share_time;
|
expiry = expiry * 2 / 3;
|
||||||
|
|
||||||
/* We shouldn't roll if we're unlikely to get one shares' duration
|
/* We shouldn't roll if we're unlikely to get one shares' duration
|
||||||
* work out of doing so */
|
* work out of doing so */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user