diff --git a/lib/pool.js b/lib/pool.js index 552f8c9..92b9049 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -51,9 +51,19 @@ var pool = module.exports = function pool(options, authorizeFn){ if (_this.stratumServer) RequestDifficulty(function(){}); }).on('newDifficulty', function(client, newDiff) { - // We request to set the newDiff @ the next difficulty retarget - // (which should happen when a new job comes in - AKA BLOCK) - client.enqueueNextDifficulty(newDiff); + + + if (options.varDiff.mode === 'fast'){ + client.sendDifficulty(newDiff); + var job = _this.jobManager.currentJob.getJobParams(); + job[8] = false; + client.sendMiningJob(job); + } + else{ + // We request to set the newDiff @ the next difficulty retarget + // (which should happen when a new job comes in - AKA BLOCK) + client.enqueueNextDifficulty(newDiff); + } }); emitLog("system", "VarDiff enabled and setup"); }