changed to pending tx as a separate call

This commit is contained in:
cubedro 2015-06-01 21:43:19 +03:00
parent fe221801a5
commit 781c839dd4
1 changed files with 6 additions and 4 deletions

View File

@ -501,19 +501,21 @@ Node.prototype.getPending = function()
{
console.info('==>', 'Getting Pending')
web3.eth.getBlockTransactionCount('pending', function (err, results)
web3.eth.getBlockTransactionCount('pending', function (err, pending)
{
if (err) {
console.error('xx>', 'getPending error: ', err);
return false;
}
var results = {};
results.end = _.now();
results.diff = results.end - now;
console.success('==>', 'Got getPending results in', chalk.reset.cyan(results.diff, 'ms'));
console.log(pending);
self.stats.pending = results.pending;
self.stats.pending = pending;
self.sendPendingUpdate();
});
@ -692,12 +694,12 @@ Node.prototype.setWatches = function()
if(time > 50)
{
self.getStats(true);
self.getPending(true);
}
else
{
debounce(function() {
self.getStats(true);
self.getPending(true);
}, 50);
}
});