diff --git a/lib/services/block/index.js b/lib/services/block/index.js index ff2f5dc4..28b9958f 100644 --- a/lib/services/block/index.js +++ b/lib/services/block/index.js @@ -852,10 +852,11 @@ BlockService.prototype._logSynced = function(blockHash, noHeight) { function(next) { if (noHeight) { - next(null, null); + return next(null, null); } self._header.getBlockHeader(blockHash, function(err, header) { + if (err) { return next(err); } @@ -892,11 +893,10 @@ BlockService.prototype._logSynced = function(blockHash, noHeight) { var supplementals = ''; if (blockHeight && timeDiff) { - supplementals += blockHeight + '. Time between the last 2 blocks (adjusted): ' + timeDiff; + supplementals += ' at height: ' + blockHeight + '. Time between the last 2 blocks (adjusted): ' + timeDiff; } - log.info('Block Service: The best block hash is: ' + blockHash + - ' at height: ' + supplementals); + log.info('Block Service: The best block hash is: ' + blockHash + supplementals); });