Browse Source

Unset wbincomplete sooner to minimise duplicate passes through check_incomplete_wbs

master
ckolivas 8 years ago
parent
commit
a772d388f4
  1. 6
      src/stratifier.c

6
src/stratifier.c

@ -1695,6 +1695,7 @@ static bool rebuild_txns(ckpool_t *ckp, sdata_t *sdata, workbase_t *wb)
}
if (ret) {
wb->incomplete = false;
LOGINFO("Rebuilt txns into workbase with %d transactions", i);
/* These two structures are regenerated so free their ram */
json_decref(wb->merkle_array);
@ -1739,10 +1740,9 @@ static void check_incomplete_wbs(ckpool_t *ckp, sdata_t *sdata)
HASH_DEL(sdata->remote_workbases, wb);
ck_wunlock(&sdata->workbase_lock);
if (rebuild_txns(ckp, sdata, wb)) {
if (rebuild_txns(ckp, sdata, wb))
LOGNOTICE("Rebuilt transactions on previously failed remote workinfo");
wb->incomplete = false;
} else
else
incomplete++;
/* Readd it to the hashlist */

Loading…
Cancel
Save