do not push unknown hash onto locators.

This commit is contained in:
Christopher Jeffrey 2016-01-04 13:39:40 -08:00
parent d1595c0ec4
commit d0cbc8f358
2 changed files with 2 additions and 4 deletions

View File

@ -632,9 +632,9 @@ Chain.prototype.locatorHashes = function locatorHashes(start) {
if (typeof start === 'number')
start = this.byHeight(start);
else
start = this.byHash(start) || start;
start = this.byHash(start);
if (start && start.index != null)
if (start)
start = start.index;
}

View File

@ -434,8 +434,6 @@ Chain.prototype.locatorHashes = function locatorHashes(start) {
// Hash
if (this.index.heights[start] != null)
top = this.index.heights[start];
else
hashes.push(start);
} else if (typeof start === 'number') {
// Height
top = start;