vardiff mode
This commit is contained in:
parent
969292c111
commit
1b7a0fd7ad
16
lib/pool.js
16
lib/pool.js
@ -51,9 +51,19 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
if (_this.stratumServer)
|
if (_this.stratumServer)
|
||||||
RequestDifficulty(function(){});
|
RequestDifficulty(function(){});
|
||||||
}).on('newDifficulty', function(client, newDiff) {
|
}).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");
|
emitLog("system", "VarDiff enabled and setup");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user