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) {
|
while (entry) {
|
||||||
let block = await this.getBlock(entry.hash);
|
let block = await this.getBlock(entry.hash);
|
||||||
let txs = [];
|
let txs = [];
|
||||||
|
|
||||||
total++;
|
total++;
|
||||||
|
|
||||||
if (!block) {
|
if (!block) {
|
||||||
@ -1234,15 +1235,15 @@ ChainDB.prototype.scan = async function scan(start, filter, iter) {
|
|||||||
let tx = block.txs[i];
|
let tx = block.txs[i];
|
||||||
let found = false;
|
let found = false;
|
||||||
|
|
||||||
for (let i = 0; i < tx.outputs.length; i++) {
|
for (let j = 0; j < tx.outputs.length; j++) {
|
||||||
let output = tx.outputs[i];
|
let output = tx.outputs[j];
|
||||||
let hash = output.getHash();
|
let hash = output.getHash();
|
||||||
|
|
||||||
if (!hash)
|
if (!hash)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (filter.test(hash)) {
|
if (filter.test(hash)) {
|
||||||
let prevout = Outpoint.fromTX(tx, i);
|
let prevout = Outpoint.fromTX(tx, j);
|
||||||
filter.add(prevout.toRaw());
|
filter.add(prevout.toRaw());
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user