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;
|
prevout = input.prevout;
|
||||||
if (filter.test(prevout.hash, 'hex')) {
|
if (filter.test(prevout.hash, 'hex')) {
|
||||||
txs.push(tx);
|
txs.push(tx);
|
||||||
filter.add(tx.hash());
|
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1570,10 +1570,8 @@ ClientSocket.prototype.testFilter = function testFilter(tx) {
|
|||||||
for (i = 0; i < tx.inputs.length; i++) {
|
for (i = 0; i < tx.inputs.length; i++) {
|
||||||
input = tx.inputs[i];
|
input = tx.inputs[i];
|
||||||
prevout = input.prevout;
|
prevout = input.prevout;
|
||||||
if (this.filter.test(prevout.hash, 'hex')) {
|
if (this.filter.test(prevout.hash, 'hex'))
|
||||||
this.filter.add(tx.hash());
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user