File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1819,8 +1819,18 @@ proc stop(m: ELManager) {.async.} =
18191819const
18201820 votedBlocksSafetyMargin = 50
18211821
1822- func earliestBlockOfInterest (m: ELManager , latestEth1BlockNumber: Eth1BlockNumber ): Eth1BlockNumber =
1823- latestEth1BlockNumber - (2 * m.cfg.ETH1_FOLLOW_DISTANCE ) - votedBlocksSafetyMargin
1822+ func earliestBlockOfInterest (
1823+ m: ELManager ,
1824+ latestEth1BlockNumber: Eth1BlockNumber ): Eth1BlockNumber =
1825+ let blocksOfInterestRange =
1826+ SLOTS_PER_ETH1_VOTING_PERIOD +
1827+ (2 * m.cfg.ETH1_FOLLOW_DISTANCE ) +
1828+ votedBlocksSafetyMargin
1829+
1830+ if latestEth1BlockNumber > blocksOfInterestRange:
1831+ latestEth1BlockNumber - blocksOfInterestRange
1832+ else :
1833+ 0
18241834
18251835proc syncBlockRange (m: ELManager ,
18261836 connection: ELConnection ,
You can’t perform that action at this time.
0 commit comments