fixed logging
This commit is contained in:
parent
60984af4c9
commit
79d29cee4d
11
lib/node.js
11
lib/node.js
@ -358,10 +358,11 @@ Node.prototype.getLatestBlock = function ()
|
|||||||
|
|
||||||
if(this._web3)
|
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) {
|
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)
|
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)
|
web3.eth.getBlock(hash, false, function (error, result)
|
||||||
{
|
{
|
||||||
self.validateLatestBlock(error, result, 'Got block ' + hash + ' in');
|
self.validateLatestBlock(error, result, timeString);
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user