diff --git a/gost/cuda_gosthash.cu b/gost/cuda_gosthash.cu index afccc77..18acb46 100644 --- a/gost/cuda_gosthash.cu +++ b/gost/cuda_gosthash.cu @@ -1047,7 +1047,7 @@ void gostd_gpu_hash_80(const uint32_t threads, const uint32_t startNonce, uint32 uint32_t dat[20]; #pragma unroll for (int i = 0; i < 19; i++) dat[i] = c_header[i]; - dat[19] = nonce; + dat[19] = cuda_swab32 (nonce); uint64_t hash1[8] = { 0 }; //iv for 512 GOST_hash_X(hash1, (uchar*)dat, 640); // 80 bytes uint64_t hash[8]; diff --git a/gost/gost.cu b/gost/gost.cu index 281c2e4..4baa9d2 100644 --- a/gost/gost.cu +++ b/gost/gost.cu @@ -75,7 +75,7 @@ extern "C" int scanhash_gost(int thr_id, struct work* work, uint32_t max_nonce, { uint32_t _ALIGN(64) vhash[8]; - endiandata[19] = work->nonces[0]; + endiandata[19] = swab32 (work->nonces[0]); gosthash(vhash, endiandata); if (swab32(vhash[0]) <= ptarget[7] /*&& fulltest(vhash, ptarget)*/) { @@ -83,7 +83,7 @@ extern "C" int scanhash_gost(int thr_id, struct work* work, uint32_t max_nonce, work_set_target_ratio(work, vhash); if (work->nonces[1] != UINT32_MAX) { - endiandata[19] = work->nonces[1]; + endiandata[19] = swab32 (work->nonces[1]); gosthash(vhash, endiandata); if (swab32(vhash[0]) <= ptarget[7] /*&& fulltest(vhash, ptarget)*/) {