Skip to content

Commit

Permalink
Fix offset margin
Browse files Browse the repository at this point in the history
  • Loading branch information
AllFi committed Sep 10, 2024
1 parent 92e63f7 commit b7bfa64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zp-relayer/pool/RelayPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export class RelayPool extends BasePool<Network> {
protected async localCacheObserverWorker(fromIndex: number): Promise<void> {
// we start checking transactions slightly earlier than the current optimistic index
// to cover the case when the indexer was already updated before onSend was called
const OFFSET_MARGIN = 10;
const OFFSET_MARGIN = 10 * OUTPLUSONE;
fromIndex = Math.max(fromIndex - OFFSET_MARGIN, 0);
logger.debug('Local cache observer worker was started', { fromIndex })
const CACHE_OBSERVE_INTERVAL_MS = 1000; // waiting time between checks
Expand Down

0 comments on commit b7bfa64

Please sign in to comment.