Skip to content

Commit

Permalink
Fixes bug for empty blocks reponse from RPC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrés Elizondo committed Nov 7, 2024
1 parent eb07ef9 commit 6e9f781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scripts/pull_and_save_block_events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export class BlockEventsScraper {

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

if (!newBlocks) {
if (newBlocks === undefined || newBlocks.length == 0 || newBlocks[0] === null) {
logger.warn('RPC responded with no new blocks.');
return;
}
Expand Down

0 comments on commit 6e9f781

Please sign in to comment.