From 9d3434ef7120b8442eea9c6cc39748ea73bf3b30 Mon Sep 17 00:00:00 2001 From: Joris Bontje Date: Wed, 11 Feb 2015 11:56:33 +0100 Subject: [PATCH] go rpc doesnt expose the block difficulty currently --- models/node.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/node.js b/models/node.js index c30f19f..7acacdd 100644 --- a/models/node.js +++ b/models/node.js @@ -49,7 +49,7 @@ Node.prototype.update = function() if(this.info.stats.peers != null) { this.info.stats.block = eth.block(parseInt(eth.number)); - if(this.info.stats.block.hash != '?'){ + if(this.info.stats.block.hash != '?' && typeof this.info.stats.block.difficulty !== 'undefined'){ this.info.stats.block.difficulty = this.web3.toDecimal(this.info.stats.block.difficulty); } this.info.stats.mining = eth.mining; @@ -65,4 +65,4 @@ Node.prototype.update = function() return this.info; }; -module.exports = Node; \ No newline at end of file +module.exports = Node;