do not push unknown hash onto locators.
This commit is contained in:
parent
d1595c0ec4
commit
d0cbc8f358
@ -632,9 +632,9 @@ Chain.prototype.locatorHashes = function locatorHashes(start) {
|
|||||||
if (typeof start === 'number')
|
if (typeof start === 'number')
|
||||||
start = this.byHeight(start);
|
start = this.byHeight(start);
|
||||||
else
|
else
|
||||||
start = this.byHash(start) || start;
|
start = this.byHash(start);
|
||||||
|
|
||||||
if (start && start.index != null)
|
if (start)
|
||||||
start = start.index;
|
start = start.index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -434,8 +434,6 @@ Chain.prototype.locatorHashes = function locatorHashes(start) {
|
|||||||
// Hash
|
// Hash
|
||||||
if (this.index.heights[start] != null)
|
if (this.index.heights[start] != null)
|
||||||
top = this.index.heights[start];
|
top = this.index.heights[start];
|
||||||
else
|
|
||||||
hashes.push(start);
|
|
||||||
} else if (typeof start === 'number') {
|
} else if (typeof start === 'number') {
|
||||||
// Height
|
// Height
|
||||||
top = start;
|
top = start;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user