mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Disable work division for CPU mining which can lead to repeated work being performed.
This commit is contained in:
parent
81418d62c7
commit
f9308f8fca
8
main.c
8
main.c
@ -3839,6 +3839,13 @@ static void roll_work(struct work *work)
|
|||||||
* recycled more rapidly and discard the clone to avoid repeating work */
|
* recycled more rapidly and discard the clone to avoid repeating work */
|
||||||
static bool divide_work(struct timeval *now, struct work *work, uint32_t hash_div)
|
static bool divide_work(struct timeval *now, struct work *work, uint32_t hash_div)
|
||||||
{
|
{
|
||||||
|
if (can_roll(work) && should_roll(work)) {
|
||||||
|
roll_work(work);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
#if 0
|
||||||
|
/* Work division is disabled because it can lead to repeated work */
|
||||||
uint64_t hash_inc;
|
uint64_t hash_inc;
|
||||||
|
|
||||||
if (work->clone)
|
if (work->clone)
|
||||||
@ -3858,6 +3865,7 @@ static bool divide_work(struct timeval *now, struct work *work, uint32_t hash_di
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool get_work(struct work *work, bool requested, struct thr_info *thr,
|
static bool get_work(struct work *work, bool requested, struct thr_info *thr,
|
||||||
|
Loading…
Reference in New Issue
Block a user