mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +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:
@@ -280,7 +280,7 @@ pub fn get_current_epoch<E: EthSpec>(genesis_time: u64, spec: &ChainSpec) -> Opt
|
||||
let slot_clock = SystemTimeSlotClock::new(
|
||||
spec.genesis_slot,
|
||||
Duration::from_secs(genesis_time),
|
||||
Duration::from_secs(spec.seconds_per_slot),
|
||||
spec.get_slot_duration(),
|
||||
);
|
||||
slot_clock.now().map(|s| s.epoch(E::slots_per_epoch()))
|
||||
}
|
||||
|
||||
@@ -185,7 +185,9 @@ async fn run<E: EthSpec>(config: ListConfig) -> Result<Vec<SingleKeystoreRespons
|
||||
eprintln!("Please keep your validator running till exit epoch");
|
||||
eprintln!(
|
||||
"Exit epoch in approximately {} secs",
|
||||
(exit_epoch - current_epoch) * spec.seconds_per_slot * E::slots_per_epoch()
|
||||
(exit_epoch - current_epoch)
|
||||
* spec.get_slot_duration().as_secs()
|
||||
* E::slots_per_epoch()
|
||||
);
|
||||
}
|
||||
ValidatorStatus::ExitedSlashed | ValidatorStatus::ExitedUnslashed => {
|
||||
|
||||
Reference in New Issue
Block a user