Merge pull request #166 from cubedro/develop

Moved temp chian request in getStats method
This commit is contained in:
Marian OANCΞA
2015-06-02 13:14:35 +03:00

View File

@@ -444,6 +444,18 @@ Node.prototype.getStats = function(forced)
console.log(' ', 'forced:', chalk.reset.cyan(forced === true));
async.parallel({
block: function (callback)
{
// TODO: Remove warkaround when web3.js is fixed
if( !self.chainFilter )
{
console.warn("Getting", chalk.reset.red('latest block'), chalk.reset.bold.red('forced'));
self.getLatestBlock();
}
callback(null, true);
},
peers: function (callback)
{
web3.net.getPeerCount(callback);
@@ -504,14 +516,6 @@ Node.prototype.getPending = function()
if (this._web3)
{
// TODO: Remove warkaround when web3.js is fixed
if( !this.chainFilter )
{
console.warn("Getting", chalk.reset.red('latest block'), chalk.reset.bold.red('forced'));
this.getLatestBlock();
}
console.info('==>', 'Getting Pending')
web3.eth.getBlockTransactionCount('pending', function (err, pending)