Reduce the number of block timestamp requests
The timestamps are only relevant within the candidate block range.
This commit is contained in:
parent
6fb48aca7d
commit
2ee15a38ed
|
@ -1918,9 +1918,8 @@ proc syncBlockRange(m: ELManager,
|
||||||
|
|
||||||
for i in 0 ..< blocksWithDeposits.len:
|
for i in 0 ..< blocksWithDeposits.len:
|
||||||
let blk = blocksWithDeposits[i]
|
let blk = blocksWithDeposits[i]
|
||||||
await fetchTimestamp(connection, rpcClient, blk)
|
|
||||||
|
|
||||||
if blk.number > fullSyncFromBlock:
|
if blk.number > fullSyncFromBlock:
|
||||||
|
await fetchTimestamp(connection, rpcClient, blk)
|
||||||
let lastBlock = m.eth1Chain.blocks.peekLast
|
let lastBlock = m.eth1Chain.blocks.peekLast
|
||||||
for n in max(lastBlock.number + 1, fullSyncFromBlock) ..< blk.number:
|
for n in max(lastBlock.number + 1, fullSyncFromBlock) ..< blk.number:
|
||||||
debug "Obtaining block without deposits", blockNum = n
|
debug "Obtaining block without deposits", blockNum = n
|
||||||
|
|
Loading…
Reference in New Issue