From 6afbedb2e725171844545a92049cb6a59a3907fa Mon Sep 17 00:00:00 2001 From: kilted-andres Date: Wed, 20 Mar 2024 16:54:53 +0100 Subject: [PATCH] feat. reduce block range and scanning interval --- src/backend/revoker/expiredInventory.ts | 2 +- src/backend/revoker/subScan.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/revoker/expiredInventory.ts b/src/backend/revoker/expiredInventory.ts index 1e4024006..d59402a4c 100644 --- a/src/backend/revoker/expiredInventory.ts +++ b/src/backend/revoker/expiredInventory.ts @@ -5,7 +5,7 @@ import { AttestationInfo } from './scanAttestations'; import { shouldBeRemoved } from './shouldBeExpired'; import { batchQueryRevoked } from './batchQueryRevoked'; -const SCAN_INTERVAL_MS = 24 * 60 * 60 * 1000; +const SCAN_INTERVAL_MS = 60 * 60 * 1000; export const attestationsToRevoke: AttestationInfo[] = []; export const attestationsToRemove: AttestationInfo[] = []; diff --git a/src/backend/revoker/subScan.ts b/src/backend/revoker/subScan.ts index d63f2bbe0..58c23127b 100644 --- a/src/backend/revoker/subScan.ts +++ b/src/backend/revoker/subScan.ts @@ -10,7 +10,7 @@ const { subscan } = configuration; const SUBSCAN_MAX_ROWS = 100; const QUERY_INTERVAL_MS = 1000; -const BLOCK_RANGE_SIZE = 100_000; +const BLOCK_RANGE_SIZE = 10_000; const subscanAPI = `https://${subscan.network}.api.subscan.io`; const eventsListURL = `${subscanAPI}/api/v2/scan/events`;