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;