Skip to content

Commit 24369d8

Browse files
author
Andrés Elizondo
committed
Avoids edge case causing missing blocks due to backfilling blocks ahead of the event scraper.
1 parent f067cde commit 24369d8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/scripts/pull_and_save_block_events.ts

+1
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ export class BlockEventsScraper {
363363
`SELECT DISTINCT block_number
364364
FROM ${SCHEMA}.tx_backfill
365365
WHERE done = false
366+
AND block_number < (select max(block_number) from ${SCHEMA}.blocks)
366367
ORDER BY block_number
367368
LIMIT ${MAX_BLOCKS_TO_PULL}`,
368369
);

0 commit comments

Comments
 (0)