Merge pull request #4930 from mempool/mononaut/filter-acc

Filter accelerations for matching pool
This commit is contained in:
wiz 2024-04-09 14:32:27 +09:00 committed by GitHub
commit 894c4cb139
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -358,11 +358,15 @@ export class BlockComponent implements OnInit, OnDestroy {
const acceleratedInBlock = {};
for (const acc of accelerations) {
acceleratedInBlock[acc.txid] = acc;
if (acc.pools?.some(pool => pool === this.block?.extras?.pool.id || pool?.['pool_unique_id'] === this.block?.extras?.pool.id)) {
acceleratedInBlock[acc.txid] = acc;
}
}
for (const tx of transactions) {
if (acceleratedInBlock[tx.txid]) {
tx.acc = true;
} else {
tx.acc = false;
}
}