From 2ee15a38ed8a650d68756c0434005a10bc5716ce Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 14 Mar 2023 13:46:22 +0200 Subject: [PATCH] Reduce the number of block timestamp requests The timestamps are only relevant within the candidate block range. --- beacon_chain/eth1/eth1_monitor.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beacon_chain/eth1/eth1_monitor.nim b/beacon_chain/eth1/eth1_monitor.nim index aa5a1bad8..3c59e613c 100644 --- a/beacon_chain/eth1/eth1_monitor.nim +++ b/beacon_chain/eth1/eth1_monitor.nim @@ -1918,9 +1918,8 @@ proc syncBlockRange(m: ELManager, for i in 0 ..< blocksWithDeposits.len: let blk = blocksWithDeposits[i] - await fetchTimestamp(connection, rpcClient, blk) - if blk.number > fullSyncFromBlock: + await fetchTimestamp(connection, rpcClient, blk) let lastBlock = m.eth1Chain.blocks.peekLast for n in max(lastBlock.number + 1, fullSyncFromBlock) ..< blk.number: debug "Obtaining block without deposits", blockNum = n