mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-14 16:58:05 +00:00
Fix nonce submission code for scrypt.
This commit is contained in:
parent
aabc723326
commit
ea444d0239
@ -3971,14 +3971,14 @@ bool hashtest(const struct work *work)
|
|||||||
|
|
||||||
bool test_nonce(struct work *work, uint32_t nonce)
|
bool test_nonce(struct work *work, uint32_t nonce)
|
||||||
{
|
{
|
||||||
if (opt_scrypt)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
work->data[64 + 12 + 0] = (nonce >> 0) & 0xff;
|
work->data[64 + 12 + 0] = (nonce >> 0) & 0xff;
|
||||||
work->data[64 + 12 + 1] = (nonce >> 8) & 0xff;
|
work->data[64 + 12 + 1] = (nonce >> 8) & 0xff;
|
||||||
work->data[64 + 12 + 2] = (nonce >> 16) & 0xff;
|
work->data[64 + 12 + 2] = (nonce >> 16) & 0xff;
|
||||||
work->data[64 + 12 + 3] = (nonce >> 24) & 0xff;
|
work->data[64 + 12 + 3] = (nonce >> 24) & 0xff;
|
||||||
|
|
||||||
|
if (opt_scrypt)
|
||||||
|
return true;
|
||||||
|
|
||||||
return hashtest(work);
|
return hashtest(work);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ static void *postcalc_hash(void *userdata)
|
|||||||
if (pcd->res[entry]) {
|
if (pcd->res[entry]) {
|
||||||
#ifdef USE_SCRYPT
|
#ifdef USE_SCRYPT
|
||||||
if (opt_scrypt)
|
if (opt_scrypt)
|
||||||
submit_nonce(thr, pcd->work, entry);
|
submit_nonce(thr, pcd->work, pcd->res[entry]);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
send_nonce(pcd, pcd->res[entry]);
|
send_nonce(pcd, pcd->res[entry]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user