Commit ea70300a59d3b40fac4c8095e305f4bdcceb9d9c

Con Kolivas 2013-04-07T15:03:08

The current hash count returned by avalon scanhash is just an obfuscated utility counter so make it explicit.

diff --git a/driver-avalon.c b/driver-avalon.c
index 98c7fc9..36fcee6 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -912,7 +912,7 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 			continue;
 		}
 
-		hash_count += nonce;
+		hash_count += 0xffffffff;
 		if (opt_debug) {
 			timersub(&tv_finish, &tv_start, &elapsed);
 			applog(LOG_DEBUG,
@@ -951,16 +951,8 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 		info->temp_sum = 0;
 	}
 
-	/*
-	 * FIXME: Each work split to 10 pieces, each piece send to a
-	 * asic(256MHs). one work can be mulit-nonce back. it is not
-	 * easy calculate correct hash on such situation. so I simplely
-	 * add each nonce to hash_count. base on Utility/m hash_count*2
-	 * give a very good result.
-	 *
-	 * Any patch will be great.
-	 */
-	return hash_count * 2;
+	/* This hashmeter is just a utility counter based on returned shares */
+	return hash_count;
 }
 
 static struct api_data *avalon_api_stats(struct cgpu_info *cgpu)