Merge pull request #3707 from mempool/simon/audit-optimization-dead-code

Removing dead code causing slowdown
This commit is contained in:
softsimon 2023-05-02 16:37:54 +04:00 committed by GitHub
commit 62ef1768ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,17 +93,7 @@ class Audit {
} else {
if (!isDisplaced[tx.txid]) {
added.push(tx.txid);
} else {
}
let blockIndex = -1;
let index = -1;
projectedBlocks.forEach((block, bi) => {
const i = block.transactionIds.indexOf(tx.txid);
if (i >= 0) {
blockIndex = bi;
index = i;
}
});
overflowWeight += tx.weight;
}
totalWeight += tx.weight;