mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 11:22:56 +00:00
Replace INTERVALS_PER_SLOT with explicit slot component times (#7944)
https://github.com/ethereum/consensus-specs/pull/4476 Co-Authored-By: Barnabas Busa <barnabas.busa@ethereum.org> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com> Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com> Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
This commit is contained in:
@@ -73,23 +73,33 @@ fn default_mock_execution_config<E: EthSpec>(
|
||||
if let Some(capella_fork_epoch) = spec.capella_fork_epoch {
|
||||
mock_execution_config.shanghai_time = Some(
|
||||
genesis_time
|
||||
+ spec.seconds_per_slot * E::slots_per_epoch() * capella_fork_epoch.as_u64(),
|
||||
+ (spec.get_slot_duration().as_secs())
|
||||
* E::slots_per_epoch()
|
||||
* capella_fork_epoch.as_u64(),
|
||||
)
|
||||
}
|
||||
if let Some(deneb_fork_epoch) = spec.deneb_fork_epoch {
|
||||
mock_execution_config.cancun_time = Some(
|
||||
genesis_time + spec.seconds_per_slot * E::slots_per_epoch() * deneb_fork_epoch.as_u64(),
|
||||
genesis_time
|
||||
+ (spec.get_slot_duration().as_secs())
|
||||
* E::slots_per_epoch()
|
||||
* deneb_fork_epoch.as_u64(),
|
||||
)
|
||||
}
|
||||
if let Some(electra_fork_epoch) = spec.electra_fork_epoch {
|
||||
mock_execution_config.prague_time = Some(
|
||||
genesis_time
|
||||
+ spec.seconds_per_slot * E::slots_per_epoch() * electra_fork_epoch.as_u64(),
|
||||
+ (spec.get_slot_duration().as_secs())
|
||||
* E::slots_per_epoch()
|
||||
* electra_fork_epoch.as_u64(),
|
||||
)
|
||||
}
|
||||
if let Some(fulu_fork_epoch) = spec.fulu_fork_epoch {
|
||||
mock_execution_config.osaka_time = Some(
|
||||
genesis_time + spec.seconds_per_slot * E::slots_per_epoch() * fulu_fork_epoch.as_u64(),
|
||||
genesis_time
|
||||
+ (spec.get_slot_duration().as_secs())
|
||||
* E::slots_per_epoch()
|
||||
* fulu_fork_epoch.as_u64(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user