mirror of
https://github.com/GOSTSec/sgminer
synced 2025-09-11 05:32:16 +00:00
Do the cheaper comparison first.
This commit is contained in:
parent
381c56f811
commit
8697d6a2ce
10
cgminer.c
10
cgminer.c
@ -2485,6 +2485,11 @@ static bool stale_work(struct work *work, bool share)
|
|||||||
struct pool *pool;
|
struct pool *pool;
|
||||||
int getwork_delay;
|
int getwork_delay;
|
||||||
|
|
||||||
|
if (work->work_block != work_block) {
|
||||||
|
applog(LOG_DEBUG, "Work stale due to block mismatch");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/* Technically the rolltime should be correct but some pools
|
/* Technically the rolltime should be correct but some pools
|
||||||
* advertise a broken expire= that is lower than a meaningful
|
* advertise a broken expire= that is lower than a meaningful
|
||||||
* scantime */
|
* scantime */
|
||||||
@ -2507,11 +2512,6 @@ static bool stale_work(struct work *work, bool share)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (work->work_block != work_block) {
|
|
||||||
applog(LOG_DEBUG, "Work stale due to block mismatch");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (opt_fail_only && !share && pool != current_pool() && !work->mandatory) {
|
if (opt_fail_only && !share && pool != current_pool() && !work->mandatory) {
|
||||||
applog(LOG_DEBUG, "Work stale due to fail only pool mismatch");
|
applog(LOG_DEBUG, "Work stale due to fail only pool mismatch");
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user