mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-05 03:24:26 +00:00
The work length in the miner thread gets smaller but doesn't get bigger if it's under 1 second.
This could end up leading to CPU under-utilisation and lower and lower hash rates. Fix it by increasing work length if it drops under 1 second.
This commit is contained in:
parent
a0924933d0
commit
da06a348d0
4
main.c
4
main.c
@ -2715,7 +2715,9 @@ static void *miner_thread(void *userdata)
|
||||
if (diff.tv_sec && diff.tv_sec != cycle) {
|
||||
max64 = work.blk.nonce +
|
||||
((uint64_t)hashes_done * cycle) / diff.tv_sec;
|
||||
} else
|
||||
} else if (!diff.tv_sec)
|
||||
max64 = work.blk.nonce + (hashes_done * 2);
|
||||
else
|
||||
max64 = work.blk.nonce + hashes_done;
|
||||
if (max64 > 0xfffffffaULL)
|
||||
max64 = 0xfffffffaULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user