mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Check for stale block after failed submission as well.
This commit is contained in:
parent
09104ce3e8
commit
48caf248a7
@ -544,6 +544,10 @@ static void *submit_work_thread(void *userdata)
|
||||
|
||||
/* submit solution to bitcoin via JSON-RPC */
|
||||
while (!submit_upstream_work(curl, wc->u.work)) {
|
||||
if (unlikely(strncmp((const char *)wc->u.work->data, current_block, 36))) {
|
||||
applog(LOG_INFO, "Stale work detected, discarding");
|
||||
goto out;
|
||||
}
|
||||
if (unlikely((opt_retries >= 0) && (++failures > opt_retries))) {
|
||||
applog(LOG_ERR, "Failed %d retries ...terminating workio thread", opt_retries);
|
||||
kill_work();
|
||||
|
Loading…
Reference in New Issue
Block a user