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:
2023-11-21 17:44:54 +05:30
committed by GitHub
parent e6b957e921
commit 729d862aac
14 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -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;