Browse Source

Sanity test

master
Con Kolivas 10 years ago
parent
commit
a102827cf9
  1. 2
      src/stratifier.c

2
src/stratifier.c

@ -713,6 +713,8 @@ static void add_base(ckpool_t *ckp, workbase_t *wb, bool *new_block)
HASH_ITER(hh, sdata->workbases, tmp, tmpa) { HASH_ITER(hh, sdata->workbases, tmp, tmpa) {
if (HASH_COUNT(sdata->workbases) < 3) if (HASH_COUNT(sdata->workbases) < 3)
break; break;
if (wb == tmp)
continue;
/* Age old workbases older than 10 minutes old */ /* Age old workbases older than 10 minutes old */
if (tmp->gentime.tv_sec < wb->gentime.tv_sec - 600) { if (tmp->gentime.tv_sec < wb->gentime.tv_sec - 600) {
HASH_DEL(sdata->workbases, tmp); HASH_DEL(sdata->workbases, tmp);

Loading…
Cancel
Save