diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 61b4d549..78cd3dbc 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -199,7 +199,7 @@ Chain.prototype.resetHeight = function resetHeight(height) { this.orphan.count = 0; this.orphan.size = 0; - for (i = height + 1; height < count; i++) { + for (i = height + 1; i < count; i++) { existing = this.db.get(i); assert(existing); delete this.heightLookup[existing.hash];