From d7db1e8a2b1dc2e519c3332903df4baf07648fe1 Mon Sep 17 00:00:00 2001 From: Kano Date: Sun, 22 Sep 2013 23:41:06 +1000 Subject: [PATCH] klondike add new nonecount only once --- driver-klondike.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver-klondike.c b/driver-klondike.c index 7ee8e1a8..b11c21d6 100644 --- a/driver-klondike.c +++ b/driver-klondike.c @@ -519,10 +519,11 @@ static int64_t klondike_scanwork(struct thr_info *thr) newhashdev += klninfo->status[dev].hashcount - klninfo->devinfo[dev].lasthashcount; klninfo->devinfo[dev].lasthashcount = klninfo->status[dev].hashcount; klninfo->hashcount += (newhashdev << 32) / klninfo->status[dev].maxcount; - newhashcount += 0xffffffffull * (uint64_t)klninfo->noncecount; // todo: check stats for critical conditions } + newhashcount += 0xffffffffull * (uint64_t)klninfo->noncecount; + klninfo->noncecount = 0; rd_unlock(&(klninfo->stat_lock)); } return newhashcount;