Commit 0314081157f7c929f3e79c63bdbddc625cf3137a

Con Kolivas 2012-11-05T22:12:27

Swab, don't just swap the bytes in the GBT target.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 5058331..201ab2b 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1569,7 +1569,7 @@ static bool gbt_decode(struct pool *pool, json_t *res_val)
 	swap256(pool->previousblockhash, hash_swap);
 
 	hex2bin(hash_swap, target, 32);
-	swap256(pool->gbt_target, hash_swap);
+	swab256(pool->gbt_target, hash_swap);
 
 	pool->gbt_expires = expires;
 	pool->gbt_version = htobe32(version);