Added test to check header.height
This commit is contained in:
parent
0cfb80a164
commit
2c37e05ff7
@ -725,12 +725,12 @@ BlockService.prototype._findLatestValidBlockHeader = function(callback) {
|
||||
log.error('Block Service: we could not locate any of our recent block hashes in the header service ' + 'index. Perhaps our header service sync\'ed to the wrong chain?');
|
||||
}
|
||||
// assert(header, 'Block Service: we could not locate any of our recent block hashes in the header service ' + 'index. Perhaps our header service sync\'ed to the wrong chain?');
|
||||
|
||||
if (header.height > self._tip.height) {
|
||||
log.error('Block Service: we found a common ancestor header whose ' + 'height was greater than our current tip. This should be impossible.');
|
||||
}
|
||||
if (typeof header.height !== 'undefined') {
|
||||
if (header.height > self._tip.height) {
|
||||
log.error('Block Service: we found a common ancestor header whose ' + 'height was greater than our current tip. This should be impossible.');
|
||||
}
|
||||
// assert(header.height <= self._tip.height, 'Block Service: we found a common ancestor header whose ' + 'height was greater than our current tip. This should be impossible.');
|
||||
|
||||
}
|
||||
callback(null, header);
|
||||
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user