Minor logging improvements
This commit is contained in:
parent
0f38fd5549
commit
2d1b23ddb8
12
lib/pool.js
12
lib/pool.js
@ -36,6 +36,7 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
var emitErrorLog = function(key, text) { _this.emit('log', 'error' , key, text); };
|
||||
|
||||
this.start = function(){
|
||||
emitLog('system', 'Starting pool for ' + options.name + ' [' + options.symbol.toUpperCase() + ']');
|
||||
SetupJobManager();
|
||||
SetupVarDiff();
|
||||
SetupDaemonInterface();
|
||||
@ -203,6 +204,12 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
return b.blocks - a.blocks;
|
||||
})[0];
|
||||
|
||||
if (options.varDiff.enabled)
|
||||
_this.varDiff.setNetworkDifficulty(largestHeight.difficulty);
|
||||
|
||||
emitLog('network', 'Current block height at ' + largestHeight.blocks +
|
||||
' with difficulty of ' + largestHeight.difficulty);
|
||||
|
||||
callback(null, largestHeight);
|
||||
}
|
||||
else{
|
||||
@ -228,13 +235,10 @@ var pool = module.exports = function pool(options, authorizeFn){
|
||||
return;
|
||||
}
|
||||
|
||||
emitLog('system','Connected to daemon');
|
||||
emitLog('system','Connected to daemon via RPC');
|
||||
|
||||
options.hasSubmitMethod = results.submitMethod;
|
||||
|
||||
if (options.varDiff.enabled)
|
||||
_this.varDiff.setNetworkDifficulty(results.miningInfo.difficulty);
|
||||
|
||||
if (options.reward === 'POS' && typeof(results.addressInfo.pubkey) == 'undefined') {
|
||||
// address provided is not of the wallet.
|
||||
emitErrorLog('system', 'The address provided is not from the daemon wallet.');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user