Skip to content

Commit

Permalink
Merge pull request #12 from vorujack/main
Browse files Browse the repository at this point in the history
fix a bug in status
  • Loading branch information
zargarzadehm authored Feb 2, 2021
2 parents e5040b9 + f20835e commit b72e5ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>\"",
b_value.toString()
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "1.0.0",
"version": "1.0.3",
"dependencies": {
"argparse": "^2.0.1",
"big-integer": "^1.6.48",
Expand Down

0 comments on commit b72e5ba

Please sign in to comment.