chaindb: minor.
This commit is contained in:
parent
a627f00a3f
commit
4771f2d0a8
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user