Browse Source

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

nfactor-troky
Con Kolivas 12 years ago
parent
commit
ea70300a59
  1. 14
      driver-avalon.c

14
driver-avalon.c

@ -912,7 +912,7 @@ static int64_t avalon_scanhash(struct thr_info *thr)
continue; continue;
} }
hash_count += nonce; hash_count += 0xffffffff;
if (opt_debug) { if (opt_debug) {
timersub(&tv_finish, &tv_start, &elapsed); timersub(&tv_finish, &tv_start, &elapsed);
applog(LOG_DEBUG, applog(LOG_DEBUG,
@ -951,16 +951,8 @@ static int64_t avalon_scanhash(struct thr_info *thr)
info->temp_sum = 0; info->temp_sum = 0;
} }
/* /* This hashmeter is just a utility counter based on returned shares */
* FIXME: Each work split to 10 pieces, each piece send to a return hash_count;
* 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;
} }
static struct api_data *avalon_api_stats(struct cgpu_info *cgpu) static struct api_data *avalon_api_stats(struct cgpu_info *cgpu)

Loading…
Cancel
Save