changed to pending tx as a separate call
This commit is contained in:
parent
fe221801a5
commit
781c839dd4
10
lib/node.js
10
lib/node.js
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user