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