1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Do the cheaper comparison first.

This commit is contained in:
Con Kolivas 2012-08-16 10:16:58 +10:00
parent 381c56f811
commit 8697d6a2ce

View File

@ -2485,6 +2485,11 @@ static bool stale_work(struct work *work, bool share)
struct pool *pool;
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
* advertise a broken expire= that is lower than a meaningful
* scantime */
@ -2507,11 +2512,6 @@ static bool stale_work(struct work *work, bool share)
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) {
applog(LOG_DEBUG, "Work stale due to fail only pool mismatch");
return true;