Skip to content

Commit

Permalink
fix: aleph zero block time (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
melisaguevara authored Dec 2, 2024
1 parent 6791f33 commit 1ba1c6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/indexer/src/services/bundles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer/src/web3/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1ba1c6e

Please sign in to comment.