Commit f50ae46850860177b21715112fcfe394c4cbb8f8

Con Kolivas 2013-04-22T09:08:51

Use flip32 function instead of open coding it in gen_stratum_work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/cgminer.c b/cgminer.c
index 1ee830d..b7772a1 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5431,8 +5431,7 @@ static void gen_stratum_work(struct pool *pool, struct work *work)
 	}
 	data32 = (uint32_t *)merkle_sha;
 	swap32 = (uint32_t *)merkle_root;
-	for (i = 0; i < 32 / 4; i++)
-		swap32[i] = swab32(data32[i]);
+	flip32(swap32, data32);
 	merkle_hash = bin2hex((const unsigned char *)merkle_root, 32);
 
 	header = calloc(pool->swork.header_len, 1);