Fixed crash when running over a POS coin
Added emitLog for debugging the Block Submit
This commit is contained in:
parent
e1c143de18
commit
bda4c57bd9
@ -199,6 +199,20 @@ var JobManager = module.exports = function JobManager(options){
|
|||||||
return shareError([23, 'low difficulty share']);
|
return shareError([23, 'low difficulty share']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!!blockHex) {
|
||||||
|
_this.emit('debugBlockShare',
|
||||||
|
{
|
||||||
|
'extraNonce1': extraNonce1,
|
||||||
|
'extraNonce2': extraNonce2,
|
||||||
|
'nTime': nTime,
|
||||||
|
'nonce': nonce,
|
||||||
|
'headerBuffer': headerBuffer.toString('hex'),
|
||||||
|
'headerHash': headerHash.toString('hex'),
|
||||||
|
'blockHex': blockHex,
|
||||||
|
'blockHash': blockHash
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
_this.emit('share', {
|
_this.emit('share', {
|
||||||
job: jobId,
|
job: jobId,
|
||||||
|
|||||||
@ -110,7 +110,9 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
function SetupJobManager(){
|
function SetupJobManager(){
|
||||||
_this.jobManager = new jobManager({
|
_this.jobManager = new jobManager({
|
||||||
algorithm : options.algorithm,
|
algorithm : options.algorithm,
|
||||||
address : options.address
|
address : options.address,
|
||||||
|
reward : options.reward,
|
||||||
|
txMessages: options.txMessages
|
||||||
});
|
});
|
||||||
_this.jobManager.on('newBlock', function(blockTemplate){
|
_this.jobManager.on('newBlock', function(blockTemplate){
|
||||||
//Check if stratumServer has been initialized yet
|
//Check if stratumServer has been initialized yet
|
||||||
@ -140,6 +142,8 @@ var pool = module.exports = function pool(options, authorizeFn){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}).on('debugBlockShare', function(debugData) {
|
||||||
|
emitLog('debugBlockSubmit', JSON.stringify(debugData));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user