Browse Source

core: Display difficulty in cgminer style, not true network difficulty (for consistency within the interface).

This regression was introduced by commit 3f6b9d6796.
nfactor-troky
Noel Maersk 11 years ago
parent
commit
cb806d2437
  1. 2
      cgminer.c

2
cgminer.c

@ -3758,7 +3758,7 @@ static void set_blockdiff(const struct work *work) @@ -3758,7 +3758,7 @@ static void set_blockdiff(const struct work *work)
uint8_t pow = work->data[72];
int powdiff = (8 * (0x1d - 3)) - (8 * (pow - 3));
uint32_t diff32 = be32toh(*((uint32_t *)(work->data + 72))) & 0x00FFFFFF;
double numerator = 0xFFFFULL << powdiff;
double numerator = 0xFFFFFFFFULL << powdiff;
double ddiff = numerator / (double)diff32;
if (unlikely(current_diff != ddiff)) {

Loading…
Cancel
Save