scanning: only add matching txids for outputs.

This commit is contained in:
Christopher Jeffrey 2016-10-24 18:55:34 -07:00
parent 02de140c91
commit c9b84252af
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 1 additions and 4 deletions

View File

@ -1153,7 +1153,6 @@ ChainDB.prototype.scan = co(function* scan(start, filter, iter) {
prevout = input.prevout;
if (filter.test(prevout.hash, 'hex')) {
txs.push(tx);
filter.add(tx.hash());
found = true;
break;
}

View File

@ -1570,10 +1570,8 @@ ClientSocket.prototype.testFilter = function testFilter(tx) {
for (i = 0; i < tx.inputs.length; i++) {
input = tx.inputs[i];
prevout = input.prevout;
if (this.filter.test(prevout.hash, 'hex')) {
this.filter.add(tx.hash());
if (this.filter.test(prevout.hash, 'hex'))
return true;
}
}
}