From b7bfa64374a786a39579131371c3cd533890224d Mon Sep 17 00:00:00 2001 From: Alexander Filippov Date: Tue, 10 Sep 2024 11:58:45 +0300 Subject: [PATCH] Fix offset margin --- zp-relayer/pool/RelayPool.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zp-relayer/pool/RelayPool.ts b/zp-relayer/pool/RelayPool.ts index c030d0d..2d16b9b 100644 --- a/zp-relayer/pool/RelayPool.ts +++ b/zp-relayer/pool/RelayPool.ts @@ -354,7 +354,7 @@ export class RelayPool extends BasePool { protected async localCacheObserverWorker(fromIndex: number): Promise { // 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