Update index.js

This commit is contained in:
tripathyr 2022-01-24 18:06:15 +05:30 committed by GitHub
parent 80f22f731f
commit f0768027c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -607,7 +607,7 @@ HeaderService.prototype._getHeader = function(height, hash, callback) {
/*jshint -W018 */
if (!hash && !(height >= 0)) {
/*jshint +W018 */
return callback(new Error('invalid arguments'));
return callback(log.error('invalid arguments'));
}
if (height === self._lastHeader.height || hash === self._lastHeader.hash) {
@ -907,7 +907,7 @@ HeaderService.prototype.getEndHash = function(tip, blockCount, callback) {
}
if (numResultsNeeded <= 0) {
return callback(new Error('Header Service: block service is mis-aligned '));
return callback(log.error('Header Service: block service is mis-aligned '));
}
var startingHeight = tip.height + 1;