From cdfe7b6ec5988e056a7819439e26476221077345 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 21 Jan 2016 18:10:04 -0800 Subject: [PATCH] add assert. --- lib/bcoin/chain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bcoin/chain.js b/lib/bcoin/chain.js index 9763cc56..62dee6e0 100644 --- a/lib/bcoin/chain.js +++ b/lib/bcoin/chain.js @@ -548,8 +548,8 @@ Chain.prototype.locatorHashes = function locatorHashes(start) { i = top; for (;;) { existing = this.db.get(i); - if (existing) - hashes.push(existing.hash); + assert(existing); + hashes.push(existing.hash); i = i - step; if (i <= 0) { if (i + step !== 0)