1
0
mirror of https://github.com/GOSTSec/cpuminer-gostd synced 2025-01-30 08:24:29 +00:00

fixed bug with multiple threads

This commit is contained in:
orignal 2017-04-03 20:57:34 -04:00
parent bd39125166
commit 0bde6ea210

6
gost.c
View File

@ -1104,10 +1104,10 @@ int scanhash_gostd(int thr_id, uint32_t *pdata, const uint32_t *ptarget,
uint32_t digest[16] __attribute__((aligned(64)));
const uint32_t Htarg = ptarget[7];
for (int i = 0; i < 20; i++)
for (int i = 0; i < 19; i++) // revert everything but nonce
data[i] = swab32(pdata[i]);
uint32_t n = data[19] - 1;
const uint32_t first_nonce = data[19];
uint32_t n = pdata[19] - 1;
const uint32_t first_nonce = pdata[19];
do
{