Browse Source

If a work item has had any mining done on it, don't consider it discarded work.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
50504ef9e0
  1. 4
      main.c
  2. 1
      miner.h

4
main.c

@ -2358,7 +2358,7 @@ static bool queue_request(struct thr_info *thr, bool needed)
static void discard_work(struct work *work) static void discard_work(struct work *work)
{ {
if (!work->clone && !work->rolls) { if (!work->clone && !work->rolls && !work->mined) {
if (work->pool) if (work->pool)
work->pool->discarded_work++; work->pool->discarded_work++;
total_discarded++; total_discarded++;
@ -2583,6 +2583,8 @@ out:
work->thr_id = thr_id; work->thr_id = thr_id;
thread_reportin(thr); thread_reportin(thr);
if (ret)
work->mined = true;
return ret; return ret;
} }

1
miner.h

@ -342,6 +342,7 @@ struct work {
int thr_id; int thr_id;
struct pool *pool; struct pool *pool;
struct timeval tv_staged; struct timeval tv_staged;
bool mined;
bool clone; bool clone;
bool cloned; bool cloned;
bool rolltime; bool rolltime;

Loading…
Cancel
Save