Throwing error removed

new Error was stopping the running instance of flosight. Substituted by log.info
This commit is contained in:
tripathyr 2022-01-24 15:15:11 +05:30 committed by GitHub
parent 1edc88f14b
commit 1888b4a4ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,7 +231,7 @@ BlockService.prototype._resetTip = function(callback) {
self._header.getAllHeaders(function(err, headers) {
if (err || !headers) {
return callback(err || new Error('headers required'));
return callback(err || log.info('headers required'));
}
log.info('Block Service: retrieved all the headers for lookups.');
@ -375,7 +375,7 @@ BlockService.prototype._loadRecentBlockHashes = function(callback) {
self.getBlock(hash, function(err, block) {
if (err || !block) {
return callback(err || new Error('Block Service: attempted to retrieve block: ' + hash +
return callback(err || log.info('Block Service: attempted to retrieve block: ' + hash +
' but was not in the index.'));
}
@ -665,7 +665,7 @@ BlockService.prototype._findLatestValidBlockHeader = function(callback) {
if (self._reorgToBlock) {
return self._header.getBlockHeader(self._reorgToBlock, function(err, header) {
if (err || !header) {
return callback(err || new Error('Block Service: header not found to reorg to.'));
return callback(err || log.info('Block Service: header not found to reorg to.'));
}
callback(null, header);
});
@ -755,13 +755,13 @@ BlockService.prototype._findBlocksToRemove = function(commonHeader, callback) {
self._getBlock(hash, function(err, block) {
if (err || !block) {
return next(err || new Error('Block Service: block not found in index.'));
return next(err || log.info('Block Service: block not found in index.'));
}
self._timestamp.getTimestamp(block.rhash(), function(err, timestamp) {
if (err || !timestamp) {
return callback(err || new Error('timestamp missing from reorg.'));
return callback(err || log.info('timestamp missing from reorg.'));
}
block.__height = height;