From fce08f54688727762172fd6e78c3bc0dc983dc7c Mon Sep 17 00:00:00 2001 From: James Hilliard Date: Wed, 21 Jun 2017 21:37:01 -0500 Subject: [PATCH] Fix testnet diff --- src/libckpool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libckpool.c b/src/libckpool.c index 20c64370..264c2118 100644 --- a/src/libckpool.c +++ b/src/libckpool.c @@ -2089,8 +2089,8 @@ double diff_from_nbits(char *nbits) pow = nbits[0]; powdiff = (8 * (0x1d - 3)) - (8 * (pow - 3)); - if (powdiff < 8) // testnet only - powdiff = 8; + if (powdiff < 0) // testnet only + powdiff = 0; diff32 = be32toh(*((uint32_t *)nbits)) & 0x00FFFFFF; numerator = 0xFFFFULL << powdiff;