Skip to content

Commit 6e9f781

Browse files
Fixes bug for empty blocks reponse from RPC.
1 parent eb07ef9 commit 6e9f781

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/pull_and_save_block_events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export class BlockEventsScraper {
430430

431431
const newBlocks = await web3Source.getBatchBlockInfoForRangeAsync(blockRangeStart, blockRangeEnd, true);
432432

433-
if (!newBlocks) {
433+
if (newBlocks === undefined || newBlocks.length == 0 || newBlocks[0] === null) {
434434
logger.warn('RPC responded with no new blocks.');
435435
return;
436436
}

0 commit comments

Comments
 (0)