diff --git a/packages/indexer/src/services/bundles.ts b/packages/indexer/src/services/bundles.ts index c797ce2..d14eabd 100644 --- a/packages/indexer/src/services/bundles.ts +++ b/packages/indexer/src/services/bundles.ts @@ -82,7 +82,7 @@ function logResultOfAssignment( unassociatedRecordsCount: number, persistedRecordsCount: number, ): void { - if (unassociatedRecordsCount > 0) { + if (persistedRecordsCount > 0) { logger.debug({ at: `Indexer#BundleEventsProcessor#assignToBundle`, message: "Found and associated events with bundles", @@ -294,7 +294,11 @@ async function assignBundleRangesToProposal( }), ); const insertResults = await dbRepository.associateBlockRangeWithBundle( - rangeSegments.filter((segment) => segment !== undefined).flat(), + rangeSegments + .filter( + (segment): segment is BlockRangeInsertType[] => segment !== undefined, + ) + .flat(), ); logResultOfAssignment( logger, diff --git a/packages/indexer/src/web3/constants.ts b/packages/indexer/src/web3/constants.ts index d264a51..d254d0d 100644 --- a/packages/indexer/src/web3/constants.ts +++ b/packages/indexer/src/web3/constants.ts @@ -110,7 +110,7 @@ export function getMaxBlockLookBack(chainId: number) { // Average block time in seconds by chain export const BLOCK_TIME_SECONDS: { [chainId: number]: number } = { - [CHAIN_IDs.ALEPH_ZERO]: 0.25, + [CHAIN_IDs.ALEPH_ZERO]: 2, [CHAIN_IDs.ARBITRUM]: 0.25, [CHAIN_IDs.BASE]: 2, [CHAIN_IDs.BLAST]: 2,