diff --git a/lib/node.js b/lib/node.js index 59103aa..82ab4bd 100644 --- a/lib/node.js +++ b/lib/node.js @@ -336,7 +336,9 @@ Node.prototype.getInfo = function() console.time('Got info'); try { - this.info.coinbase = web3.eth.coinbase; + if (web3.eth.mining) { + this.info.coinbase = web3.eth.coinbase; + } this.info.node = web3.version.node; this.info.net = web3.version.network; this.info.protocol = web3.toDecimal(web3.version.ethereum); @@ -489,7 +491,9 @@ Node.prototype.getStats = function(forced) }, hashrate: function (callback) { - web3.eth.getHashrate(callback); + if (web3.eth.mining) { + web3.eth.getHashrate(callback); + } }, gasPrice: function (callback) {