Commit e370996c95868b6d872dfc10dd376a743e5a2353

Con Kolivas 2014-05-09T09:21:45

Work stats should be based on device_diff not work_difficulty since non-shares haven't been filtered out yet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/cgminer.c b/cgminer.c
index 10053ab..6271f2c 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7125,9 +7125,9 @@ static void update_work_stats(struct thr_info *thr, struct work *work)
 	}
 
 	mutex_lock(&stats_lock);
-	total_diff1 += work->work_difficulty;
-	thr->cgpu->diff1 += work->work_difficulty;
-	work->pool->diff1 += work->work_difficulty;
+	total_diff1 += work->device_diff;
+	thr->cgpu->diff1 += work->device_diff;
+	work->pool->diff1 += work->device_diff;
 	thr->cgpu->last_device_valid_work = time(NULL);
 	mutex_unlock(&stats_lock);
 }