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);