Added initial vardiff. Needs testing...
This commit is contained in:
parent
94a0b04323
commit
e1c24559f0
@ -41,11 +41,14 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
|
|
||||||
|
|
||||||
function SetupVarDiff(){
|
function SetupVarDiff(){
|
||||||
_this.varDiff = new varDifff(options.varDiff, options.difficulty);
|
_this.varDiff = new varDiff(options.varDiff, options.difficulty);
|
||||||
_this.varDiff.on('difficultyRequest', function(){
|
_this.varDiff.on('difficultyRequest', function(){
|
||||||
emitLog('varDiff', 'Difficulty requested for vardiff');
|
emitLog('varDiff', 'Difficulty requested for vardiff');
|
||||||
if (_this.stratumServer)
|
if (_this.stratumServer)
|
||||||
RequestDifficulty(function(){});
|
RequestDifficulty(function(){});
|
||||||
|
}).on('newDifficulty', function(client, newDiff){
|
||||||
|
client.sendDifficulty(newDiff);
|
||||||
|
client.sendMiningJob(_this.jobManager.currentJob.getJobParams());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -121,7 +121,7 @@ var varDiff = module.exports = function varDiff(options, poolDifficulty){
|
|||||||
|
|
||||||
console.log('sending new difficutly ' + newDiff);
|
console.log('sending new difficutly ' + newDiff);
|
||||||
|
|
||||||
client.sendDifficulty(newDiff);
|
_this.emit('newDifficulty', client, newDiff);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user