chain: only rescan output hashes.

This commit is contained in:
Christopher Jeffrey 2016-10-22 12:21:00 -07:00
parent d371fc5d14
commit f735c7da83
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -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];