From a772d388f446c2a6a33090e686be365601c73a0a Mon Sep 17 00:00:00 2001 From: ckolivas Date: Wed, 8 Feb 2017 14:45:58 +1100 Subject: [PATCH] Unset wbincomplete sooner to minimise duplicate passes through check_incomplete_wbs --- src/stratifier.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 2b35af76..b0515481 100644 --- a/src/stratifier.c +++ b/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 */