mirror of
https://github.com/cerc-io/watcher-ts
synced 2026-09-09 17:24:07 +00:00
Fix fetching blocks near chain head in job-runner (#485)
* Fix null blocks check in job-runner when fetching near chain head * Upgrade package versions
This commit is contained in:
@@ -81,7 +81,7 @@ export const fetchBlocksAtHeight = async (
|
||||
console.timeEnd(`time:common#_fetchBlocks-eth-server-${blockNumber}`);
|
||||
|
||||
// Check if all blocks are null and increment blockNumber to index next block number
|
||||
if (ethFullBlocks.every(block => block === null)) {
|
||||
if (ethFullBlocks.length > 0 && ethFullBlocks.every(block => block === null)) {
|
||||
blockNumber++;
|
||||
log(`Block ${blockNumber} requested was null (FEVM); Fetching next block`);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user