Skip to content

Commit 1ba1c6e

Browse files
fix: aleph zero block time (#124)
1 parent 6791f33 commit 1ba1c6e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

packages/indexer/src/services/bundles.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function logResultOfAssignment(
8282
unassociatedRecordsCount: number,
8383
persistedRecordsCount: number,
8484
): void {
85-
if (unassociatedRecordsCount > 0) {
85+
if (persistedRecordsCount > 0) {
8686
logger.debug({
8787
at: `Indexer#BundleEventsProcessor#assignToBundle`,
8888
message: "Found and associated events with bundles",
@@ -294,7 +294,11 @@ async function assignBundleRangesToProposal(
294294
}),
295295
);
296296
const insertResults = await dbRepository.associateBlockRangeWithBundle(
297-
rangeSegments.filter((segment) => segment !== undefined).flat(),
297+
rangeSegments
298+
.filter(
299+
(segment): segment is BlockRangeInsertType[] => segment !== undefined,
300+
)
301+
.flat(),
298302
);
299303
logResultOfAssignment(
300304
logger,

packages/indexer/src/web3/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export function getMaxBlockLookBack(chainId: number) {
110110

111111
// Average block time in seconds by chain
112112
export const BLOCK_TIME_SECONDS: { [chainId: number]: number } = {
113-
[CHAIN_IDs.ALEPH_ZERO]: 0.25,
113+
[CHAIN_IDs.ALEPH_ZERO]: 2,
114114
[CHAIN_IDs.ARBITRUM]: 0.25,
115115
[CHAIN_IDs.BASE]: 2,
116116
[CHAIN_IDs.BLAST]: 2,

0 commit comments

Comments
 (0)