Browse Source

avalon2: Always use pdiff 1 for shares

Luke Dashjr 12 years ago
parent
commit
e25fa7bd64
1 changed files with 3 additions and 2 deletions
  1. 3 2
      driver-avalonmm.c

+ 3 - 2
driver-avalonmm.c

@@ -229,7 +229,7 @@ static int decode_pkg(struct thr_info *thr, struct avalon2_ret *ar, uint8_t *pkg
 				break;
 				break;
 
 
 			if (thr && !info->new_stratum)
 			if (thr && !info->new_stratum)
-				work2d_submit_nonce(thr, &pool->swork, &info->tv_prepared, xnonce2, info->xnonce1, nonce, pool->swork.ntime, NULL, target_diff(pool->swork.target));
+				work2d_submit_nonce(thr, &pool->swork, &info->tv_prepared, xnonce2, info->xnonce1, nonce, pool->swork.ntime, NULL, 1.);
 			break;
 			break;
 		case AVA2_P_STATUS:
 		case AVA2_P_STATUS:
 			if (thr)
 			if (thr)
@@ -416,7 +416,8 @@ static int avalon2_stratum_pkgs(int fd, struct pool *pool, struct thr_info *thr)
 	while (avalon2_send_pkg(fd, &pkg, thr) != AVA2_SEND_OK)
 	while (avalon2_send_pkg(fd, &pkg, thr) != AVA2_SEND_OK)
 		;
 		;
 
 
-	memcpy(target, pool->swork.target, sizeof(target));
+	memset(&target[   0], 0xff, 0x1c);
+	memset(&target[0x1c],    0,    4);
 	memcpy(pkg.data, target, 32);
 	memcpy(pkg.data, target, 32);
 	if (opt_debug) {
 	if (opt_debug) {
 		char target_str[(32 * 2) + 1];
 		char target_str[(32 * 2) + 1];