From b8a642547e1e9dd09025902dff9e1d98d0ad1165 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sat, 7 Apr 2018 22:05:19 +0300 Subject: [PATCH] fix share diff calculation --- gost/gost.cu | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gost/gost.cu b/gost/gost.cu index aeb6c63..82d3a30 100644 --- a/gost/gost.cu +++ b/gost/gost.cu @@ -83,13 +83,18 @@ extern "C" int scanhash_gostd(int thr_id, struct work* work, uint32_t max_nonce, if (work->nonces[0] != UINT32_MAX) { uint32_t _ALIGN(64) vhash[8]; + uint32_t _ALIGN(64) vhash_le[8]; endiandata[19] = swab32 (work->nonces[0]); gostd_hash(vhash, endiandata); if (swab32(vhash[0]) <= ptarget[7] /*&& fulltest(vhash, ptarget)*/) { work->valid_nonces = 1; - work_set_target_ratio(work, vhash); + + for (int i = 0; i < 8; i++) + vhash_le[i] = swab32(vhash[7-i]); + + work_set_target_ratio(work, vhash_le); if (work->nonces[1] != UINT32_MAX) { endiandata[19] = swab32 (work->nonces[1]);