From f735c7da83aa8469e93f159a8c0d921d109d3ced Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 22 Oct 2016 12:21:00 -0700 Subject: [PATCH] chain: only rescan output hashes. --- lib/chain/chaindb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chain/chaindb.js b/lib/chain/chaindb.js index 1ec96c5a..b54e5e9e 100644 --- a/lib/chain/chaindb.js +++ b/lib/chain/chaindb.js @@ -1095,7 +1095,7 @@ ChainDB.prototype.scan = co(function* scan(start, filter, iter) { throw new Error('Cannot rescan an alternate chain.'); while (entry) { - block = yield this.getFullBlock(entry.hash); + block = yield this.getBlock(entry.hash); total++; if (!block) @@ -1109,7 +1109,7 @@ ChainDB.prototype.scan = co(function* scan(start, filter, iter) { for (i = 0; i < block.txs.length; i++) { tx = block.txs[i]; - hashes = tx.getHashes('hex'); + hashes = tx.getOutputHashes('hex'); for (j = 0; j < hashes.length; j++) { hash = hashes[j];