mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Add debugging output when work is found stale as to why.
This commit is contained in:
parent
efba82fb56
commit
8414a9a7e2
12
cgminer.c
12
cgminer.c
@ -2306,14 +2306,20 @@ static bool stale_work(struct work *work, bool share)
|
|||||||
work_expiry = 5;
|
work_expiry = 5;
|
||||||
|
|
||||||
gettimeofday(&now, NULL);
|
gettimeofday(&now, NULL);
|
||||||
if ((now.tv_sec - work->tv_staged.tv_sec) >= work_expiry)
|
if ((now.tv_sec - work->tv_staged.tv_sec) >= work_expiry) {
|
||||||
|
applog(LOG_DEBUG, "Work stale due to expiry");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (work->work_block != work_block)
|
if (work->work_block != work_block) {
|
||||||
|
applog(LOG_DEBUG, "Work stale due to block mismatch");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (opt_fail_only && !share && pool != current_pool() && pool->enabled != POOL_REJECTING)
|
if (opt_fail_only && !share && pool != current_pool() && pool->enabled != POOL_REJECTING) {
|
||||||
|
applog(LOG_DEBUG, "Work stale due to fail only pool mismatch");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user