From a202be497664115014f75e65c6d07da5d38f46ca Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 20 Feb 2014 00:11:30 -0700 Subject: [PATCH] Added log message for if running on testnet or live blockchain --- lib/pool.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/pool.js b/lib/pool.js index e9ed9c1..62bb64e 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -184,6 +184,18 @@ var pool = module.exports = function pool(options, authorizeFn){ } ); }, + miningInfo: function(callback){ + _this.daemon.cmd('getmininginfo', [], function(error, result){ + if (!error && result){ + emitLog('system', 'Daemon is running on ' + + (result.testnet ? 'testnet' : 'live blockchain')) + } + else + emitErrorLog('system', 'getmininginfo on init failed'); + + callback(error, result); + }); + }, submitMethod: function(callback){ /* This checks to see whether the daemon uses submitblock @@ -209,6 +221,7 @@ var pool = module.exports = function pool(options, authorizeFn){ emitErrorLog('system', 'The address provided is not from the daemon wallet.'); return; } else { + publicKeyBuffer = options.reward === 'POW' ? util.script_to_address(results.addressInfo.address) : util.script_to_pubkey(results.addressInfo.pubkey);