diff --git a/client.js b/client.js index 7ed1ec9..9d6e621 100644 --- a/client.js +++ b/client.js @@ -90,7 +90,7 @@ const handle_mining_candidate = (request, response) => { extraNonce2Size: job.extraNonce2Size, height: job.prevhash }); - const b_value = BigInt(job.miningDiff) !== BigInt(0) ? (BigInt(job.nbits).minus(BigInt(1))).multiply(BigInt(job.miningDiff)) : BigInt(job.nbits); + const b_value = BigInt(job.miningDiff).equals(BigInt(0)) ? BigInt(job.nbits) : (BigInt(job.nbits).minus(BigInt(1))).multiply(BigInt(job.miningDiff)); res = res.replace("\"\"", b_value.toString() ); diff --git a/package.json b/package.json index 4867be8..0836d2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "client", - "version": "1.0.0", + "version": "1.0.3", "dependencies": { "argparse": "^2.0.1", "big-integer": "^1.6.48",