1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

fixes target calc for mips openwrt

This commit is contained in:
nelisky 2012-11-24 13:11:07 -08:00
parent c93e5e95cd
commit 6db7e2e5cf

6
util.c
View File

@ -619,9 +619,13 @@ bool fulltest(const unsigned char *hash, const unsigned char *target)
swap256(target_swap, target); swap256(target_swap, target);
for (i = 0; i < 32/4; i++) { for (i = 0; i < 32/4; i++) {
#ifdef MIPSEB
uint32_t h32tmp = hash32[i];
uint32_t t32tmp = swab32(target32[i]);
#else
uint32_t h32tmp = swab32(hash32[i]); uint32_t h32tmp = swab32(hash32[i]);
uint32_t t32tmp = target32[i]; uint32_t t32tmp = target32[i];
#endif
target32[i] = swab32(target32[i]); /* for printing */ target32[i] = swab32(target32[i]); /* for printing */
if (h32tmp > t32tmp) { if (h32tmp > t32tmp) {