Update index.js
This commit is contained in:
parent
1888b4a4ae
commit
c3cc5f7465
@ -277,7 +277,7 @@ BlockService.prototype._resetTip = function(callback) {
|
|||||||
|
|
||||||
if (err || !block) {
|
if (err || !block) {
|
||||||
return callback(err ||
|
return callback(err ||
|
||||||
new Error('Block Service: none of the blocks from the headers match what is already indexed in the block service.'));
|
log.info('Block Service: none of the blocks from the headers match what is already indexed in the block service.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
self._setTip({ hash: block.rhash(), height: height + 1 }, callback);
|
self._setTip({ hash: block.rhash(), height: height + 1 }, callback);
|
||||||
@ -415,7 +415,7 @@ BlockService.prototype._getTimeSinceLastBlock = function(callback) {
|
|||||||
self._header.getBlockHeader(Math.max(self._tip.height - 1, 0), function(err, header) {
|
self._header.getBlockHeader(Math.max(self._tip.height - 1, 0), function(err, header) {
|
||||||
|
|
||||||
if(err || !header) {
|
if(err || !header) {
|
||||||
return callback(err || new Error('Block Service: we should have a header in order to get time since last block.'));
|
return callback(err || log.info('Block Service: we should have a header in order to get time since last block.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
async.map([ self._tip.hash, header.hash ], function(hash, next) {
|
async.map([ self._tip.hash, header.hash ], function(hash, next) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user