scanning: only add matching txids for outputs.
This commit is contained in:
parent
02de140c91
commit
c9b84252af
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user