go rpc doesnt expose the block difficulty currently

This commit is contained in:
Joris Bontje 2015-02-11 11:56:33 +01:00
parent 7632de1f40
commit 9d3434ef71
1 changed files with 2 additions and 2 deletions

View File

@ -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;
module.exports = Node;