From 4771f2d0a892feb4317a18303e02159ede212032 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 9 Jul 2017 22:10:56 -0700 Subject: [PATCH] chaindb: minor. --- lib/blockchain/chaindb.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/blockchain/chaindb.js b/lib/blockchain/chaindb.js index f8552544..d5c31dc8 100644 --- a/lib/blockchain/chaindb.js +++ b/lib/blockchain/chaindb.js @@ -1216,6 +1216,7 @@ ChainDB.prototype.scan = async function scan(start, filter, iter) { while (entry) { let block = await this.getBlock(entry.hash); let txs = []; + total++; if (!block) { @@ -1234,15 +1235,15 @@ ChainDB.prototype.scan = async function scan(start, filter, iter) { let tx = block.txs[i]; let found = false; - for (let i = 0; i < tx.outputs.length; i++) { - let output = tx.outputs[i]; + for (let j = 0; j < tx.outputs.length; j++) { + let output = tx.outputs[j]; let hash = output.getHash(); if (!hash) continue; if (filter.test(hash)) { - let prevout = Outpoint.fromTX(tx, i); + let prevout = Outpoint.fromTX(tx, j); filter.add(prevout.toRaw()); found = true; }