consider blocks with deposits in eth1 data vote (#3944)

When importing blocks with deposits from the EL, the timestamp is never
initialized for them. Therefore, only blocks without deposits (for which
the timestamp is obtained) are considered for `is_candidate_block`.
This is fixed by also importing timestamps for blocks with deposits.
This commit is contained in:
Etan Kissling 2022-08-10 00:14:02 +02:00 committed by GitHub
parent 4ef621f926
commit ede83b1805
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1174,6 +1174,7 @@ proc syncBlockRange(m: Eth1Monitor,
for i in 0 ..< blocksWithDeposits.len:
let blk = blocksWithDeposits[i]
awaitWithRetries m.dataProvider.fetchTimestamp(blk)
if blk.number > fullSyncFromBlock:
let lastBlock = m.depositsChain.blocks.peekLast