Skip to content

Commit

Permalink
fix(bundles ans-104): ensure non-bundle TXs get cleared from prioriti…
Browse files Browse the repository at this point in the history
…zed list PE-4306

Before this they were only getting removed for matching TXs. While it's
unlikely this would ever leak enough memory to be an issue they, should
be removed in both cases.
  • Loading branch information
djwhitt committed Aug 7, 2023
1 parent e3551ea commit 7499e9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ eventEmitter.on(
rootTransactionId: 'root_tx_id' in item ? item.root_tx_id : item.id,
format: 'ans-104',
});
const prioritized = prioritizedTxIds.has(item.id);
prioritizedTxIds.delete(item.id);
if (await config.ANS104_UNBUNDLE_FILTER.match(item)) {
bundlesMatchedCounter.inc({ bundle_format: 'ans-104' });
await db.saveBundle({
Expand All @@ -274,8 +276,6 @@ eventEmitter.on(
indexFilter: config.ANS104_INDEX_FILTER_STRING,
queuedAt: currentUnixTimestamp(),
});
const prioritized = prioritizedTxIds.has(item.id);
prioritizedTxIds.delete(item.id);
ans104Unbundler.queueItem(
{
index:
Expand Down
2 changes: 1 addition & 1 deletion src/workers/ans104-unbundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class Ans104Unbundler {
this.queue.push(item);
log.debug('Bundle queued.');
} else {
log.info('Skipping unbundle, queue is full.');
log.debug('Skipping unbundle, queue is full.');
}
}

Expand Down

0 comments on commit 7499e9e

Please sign in to comment.