1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

Round target difficulties down to be in keeping with the rounding of detected share difficulties.

This commit is contained in:
Con Kolivas 2012-10-15 10:29:44 +11:00
parent 7450b25e75
commit d4f8a0b2b5

View File

@ -2048,7 +2048,7 @@ static bool submit_upstream_work(const struct work *work, CURL *curl, bool resub
if (opt_scrypt)
sprintf(hashshow, "%08lx.%08lx", (unsigned long)(hash32[7]), (unsigned long)(hash32[6]));
else {
int intdiff = round(work->work_difficulty);
int intdiff = floor(work->work_difficulty);
uint64_t sharediff = share_diff(work);
char diffdisp[16];
@ -4146,7 +4146,7 @@ static void stratum_share_result(json_t *val, json_t *res_val, json_t *err_val,
int intdiff;
hash32 = (uint32_t *)(work->hash);
intdiff = round(work->work_difficulty);
intdiff = floor(work->work_difficulty);
suffix_string(sharediff, diffdisp, 0);
sprintf(hashshow, "%08lx Diff %s/%d%s", (unsigned long)(hash32[6]), diffdisp, intdiff,
work->block? " BLOCK!" : "");