From 6d649b8b8b8cd03b9552d35c1fb6721b363ef1a3 Mon Sep 17 00:00:00 2001 From: cubedro Date: Thu, 30 Apr 2015 12:29:40 +0300 Subject: [PATCH] fixed checkWeb3 error message --- lib/node.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/node.js b/lib/node.js index d869c99..45bbe14 100644 --- a/lib/node.js +++ b/lib/node.js @@ -137,7 +137,7 @@ Node.prototype.checkWeb3Connection = function() } catch(err) { - console.error('xx> Ethereum connection attempt #' + this.called++ + ' failed; ', err); + console.error('xx> Ethereum connection attempt #' + this._called++ + ' failed;'); process.nextTick( function() { @@ -288,18 +288,8 @@ Node.prototype.getBlock = function(number) timestamp: 0 }; - if( _.isUndefined(number) ){ + if( _.isUndefined(number) ) number = "latest"; - // try { - // number = web3.eth.blockNumber; - - // if(number === this.stats.block.number) - // return this.stats.block; - // } - // catch (err) { - // console.error("blockNumber:", err); - // } - } try { block = web3.eth.getBlock(number, true);