Added events for mpos compatibility
This commit is contained in:
parent
f2438a4259
commit
6cdc9214ac
@ -136,7 +136,7 @@ pool.on('share', function(isValidShare, isValidBlock, data){
|
||||
*/
|
||||
pool.on('log', function(severity, logKey, logText){
|
||||
console.log(severity + ': ' + '[' + logKey + '] ' + logText);
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
Start pool
|
||||
|
||||
@ -230,7 +230,9 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
if (options.varDiff.enabled)
|
||||
_this.varDiff.manageClient(client);
|
||||
|
||||
client.on('subscription', function(params, resultCallback){
|
||||
client.on('difficultyChanged', function(diff){
|
||||
_this.emit('difficultyUpdate', client.workerName, diff);
|
||||
}).on('subscription', function(params, resultCallback){
|
||||
|
||||
var extraNonce = _this.jobManager.extraNonceCounter.next();
|
||||
var extraNonce2Size = _this.jobManager.extraNonce2Size;
|
||||
|
||||
@ -141,6 +141,10 @@ var StratumClient = function(options){
|
||||
});
|
||||
}
|
||||
);
|
||||
if (_this.lastEmittedDiff !== _this.difficulty){
|
||||
_this.lastEmittedDiff = _this.difficulty
|
||||
_this.emit('difficultyChanged', _this.difficulty);
|
||||
}
|
||||
}
|
||||
|
||||
function sendJson(){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user