diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 3c86ad13..42404433 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -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; } diff --git a/lib/bcoin/fullchain.js b/lib/bcoin/fullchain.js index d85062c6..9f914bf6 100644 --- a/lib/bcoin/fullchain.js +++ b/lib/bcoin/fullchain.js @@ -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;