Browse Source

Bugfix: regeneratehash needs to compare hash segments in Little Endian, not Big Endian

Luke Dashjr 13 years ago
parent
commit
52df1ebd1a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cgminer.c

+ 1 - 1
cgminer.c

@@ -1678,7 +1678,7 @@ bool regeneratehash(const struct work *work)
 	diffcmp[diffbytes >> 2] = diffvalue << diffshift;
 
 	for (i = 7; i >= 0; i--) {
-		uint32_t hash32i = be32toh(hash32[i]);
+		uint32_t hash32i = le32toh(hash32[i]);
 		if (hash32i > diffcmp[i])
 			return false;
 		if (hash32i < diffcmp[i])