mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
We should not retry submitting shares indefinitely or we may end up with a huge backlog during network outages, so discard stale shares if we failed to submit them and they've become stale in the interim.
This commit is contained in:
parent
0171c84e75
commit
7638511290
@ -2158,8 +2158,8 @@ static void *submit_work_thread(void *userdata)
|
|||||||
|
|
||||||
/* submit solution to bitcoin via JSON-RPC */
|
/* submit solution to bitcoin via JSON-RPC */
|
||||||
while (!submit_upstream_work(work, pool->submit_curl)) {
|
while (!submit_upstream_work(work, pool->submit_curl)) {
|
||||||
if (!opt_submit_stale && stale_work(work, true) && !pool->submit_old) {
|
if (stale_work(work, true)) {
|
||||||
applog(LOG_NOTICE, "Stale share detected on submit retry, discarding");
|
applog(LOG_NOTICE, "Share became stale while retrying submit, discarding");
|
||||||
total_stale++;
|
total_stale++;
|
||||||
pool->stale_shares++;
|
pool->stale_shares++;
|
||||||
break;
|
break;
|
||||||
@ -2211,8 +2211,8 @@ static void *submit_extra_work(void *userdata)
|
|||||||
|
|
||||||
/* submit solution to bitcoin via JSON-RPC */
|
/* submit solution to bitcoin via JSON-RPC */
|
||||||
while (!submit_upstream_work(work, curl)) {
|
while (!submit_upstream_work(work, curl)) {
|
||||||
if (!opt_submit_stale && stale_work(work, true)) {
|
if (stale_work(work, true)) {
|
||||||
applog(LOG_NOTICE, "Stale share detected, discarding");
|
applog(LOG_NOTICE, "Share became stale while retrying submit, discarding");
|
||||||
total_stale++;
|
total_stale++;
|
||||||
pool->stale_shares++;
|
pool->stale_shares++;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user