From c898ecd52cbd8da587c8538b1e092839845c383d Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 20 Feb 2014 00:02:18 -0700 Subject: [PATCH] Updated some comments --- README.md | 2 +- lib/pool.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 37044e4..92aa97a 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Features (need additional testing) Requirements ------------ * node v0.10+ -* coin daemon +* coin daemon (preferably one with a relatively updated API and not some crapcoin :p) Example Usage diff --git a/lib/pool.js b/lib/pool.js index baf051f..e9ed9c1 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -54,11 +54,14 @@ var pool = module.exports = function pool(options, authorizeFn){ if (options.varDiff.mode === 'safe'){ - // We request to set the newDiff @ the next difficulty retarget - // (which should happen when a new job comes in - AKA BLOCK) + /* We request to set the newDiff @ the next difficulty retarget + (which should happen when a new job comes in - AKA BLOCK) */ client.enqueueNextDifficulty(newDiff); } else{ + /* Send new difficulty, then force miner to use new diff by resending the + current job parameters but with the "clean jobs" flag set to false + so the miner doesn't restart work and submit duplicate shares */ client.sendDifficulty(newDiff); var job = _this.jobManager.currentJob.getJobParams(); job[8] = false;