mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +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:
@@ -488,7 +488,7 @@ impl<E: EthSpec> Tester<E> {
|
||||
let since_genesis = tick
|
||||
.checked_sub(genesis_time)
|
||||
.ok_or_else(|| Error::FailedToParseTest("tick is prior to genesis".into()))?;
|
||||
let slots_since_genesis = since_genesis / self.spec.seconds_per_slot;
|
||||
let slots_since_genesis = since_genesis / self.spec.get_slot_duration().as_secs();
|
||||
Ok(self.spec.genesis_slot + slots_since_genesis)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user