From cb806d24373cd0f4526da71299ef693f45fcd51e Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Tue, 14 Jan 2014 19:33:20 +0200 Subject: [PATCH] core: Display difficulty in cgminer style, not true network difficulty (for consistency within the interface). This regression was introduced by commit 3f6b9d679621bfd88ce1e435dc265fa0a4d78c79. --- cgminer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgminer.c b/cgminer.c index e0607392..86a549cc 100644 --- a/cgminer.c +++ b/cgminer.c @@ -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)) {