Commit e8aefc7af41cd06e3e0675d262749a8c9216beb0

Con Kolivas 2014-03-10T16:50:49

Cta share_hashes should be added, and we can base it on device wdiff instead of pool work difficulty for more accurate hashrates.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-cointerra.c b/driver-cointerra.c
index 2291103..2ef1a85 100644
--- a/driver-cointerra.c
+++ b/driver-cointerra.c
@@ -368,8 +368,7 @@ static void cta_parse_recvmatch(struct thr_info *thr, struct cgpu_info *cointerr
 			ret = submit_tested_work(thr, work);
 
 			mutex_lock(&info->lock);
-			if (ret)
-				info->share_hashes = (uint64_t)work->work_difficulty * 0x100000000ull;
+			info->share_hashes += (uint64_t)wdiff * 0x100000000ull;
 			info->hashes += nonce;
 			mutex_unlock(&info->lock);
 		} else {