mirror of
https://github.com/GOSTSec/ccminer
synced 2025-03-13 05:51:19 +00:00
correct sequence of nonces
This commit is contained in:
parent
9294a6cd92
commit
581aa3079b
@ -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];
|
||||
|
@ -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)*/)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user