commit
7f44dc7a6c
11
lib/node.js
11
lib/node.js
@ -358,10 +358,11 @@ Node.prototype.getLatestBlock = function ()
|
||||
|
||||
if(this._web3)
|
||||
{
|
||||
console.time('==>', 'Got block in');
|
||||
var timeString = 'Got block in' + chalk.reset.red('');
|
||||
console.time('==>', timeString);
|
||||
|
||||
web3.eth.getBlock('latest', false, function(error, result) {
|
||||
self.validateLatestBlock(error, result, 'Got block in');
|
||||
self.validateLatestBlock(error, result, timeString);
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -568,11 +569,13 @@ Node.prototype.setWatches = function()
|
||||
|
||||
this._latestQueue = async.queue(function (hash, callback)
|
||||
{
|
||||
console.time('==>', 'Got block ' + hash + ' in');
|
||||
var timeString = 'Got block in ' + chalk.reset.red(hash) + chalk.reset.bold.white(' in') + chalk.reset.green('');
|
||||
|
||||
console.time('==>', timeString);
|
||||
|
||||
web3.eth.getBlock(hash, false, function (error, result)
|
||||
{
|
||||
self.validateLatestBlock(error, result, 'Got block ' + hash + ' in');
|
||||
self.validateLatestBlock(error, result, timeString);
|
||||
|
||||
callback();
|
||||
});
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "eth-net-intelligence-api",
|
||||
"description": "Ethereum Network Intelligence API",
|
||||
"version": "0.0.10",
|
||||
"version": "0.0.11",
|
||||
"private": true,
|
||||
"main": "./app.js",
|
||||
"directories": {
|
||||
|
Loading…
Reference in New Issue
Block a user