Another fix where vardiff was breaking things
This commit is contained in:
parent
b2052b6fbd
commit
b965b2d61d
@ -77,7 +77,8 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
|
||||
function SetupVarDiff(){
|
||||
Object.keys(options.ports).forEach(function(port) {
|
||||
_this.setVarDiff(port, new varDiff(port, options.ports[port].varDiff));
|
||||
if (options.ports[port].varDiff)
|
||||
_this.setVarDiff(port, new varDiff(port, options.ports[port].varDiff));
|
||||
});
|
||||
}
|
||||
|
||||
@ -416,6 +417,7 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
var processedNewBlock = _this.jobManager.processTemplate(result.response, publicKeyBuffer);
|
||||
|
||||
if (processedNewBlock) {
|
||||
|
||||
Object.keys(_this.varDiff).forEach(function(port){
|
||||
_this.varDiff[port].setNetworkDifficulty(_this.jobManager.currentJob.difficulty);
|
||||
});
|
||||
|
||||
@ -48,7 +48,7 @@ var varDiff = module.exports = function varDiff(port, varDiffOptions){
|
||||
|
||||
var bufferSize, tMin, tMax;
|
||||
|
||||
if (!varDiffOptions) return;
|
||||
//if (!varDiffOptions) return;
|
||||
|
||||
var variance = varDiffOptions.targetTime * (varDiffOptions.variancePercent / 100);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user