mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 02:42:38 +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:
@@ -113,8 +113,9 @@ impl ValidatorRegistrations {
|
||||
// Apply the change from the next epoch after adding some delay buffer to ensure
|
||||
// the node has enough time to subscribe to subnets etc, and to avoid having
|
||||
// inconsistent column counts within an epoch.
|
||||
let effective_delay_slots =
|
||||
CUSTODY_CHANGE_DA_EFFECTIVE_DELAY_SECONDS / spec.seconds_per_slot;
|
||||
let effective_delay_slots = CUSTODY_CHANGE_DA_EFFECTIVE_DELAY_SECONDS
|
||||
.checked_div(spec.get_slot_duration().as_secs())
|
||||
.unwrap_or(1);
|
||||
let effective_epoch =
|
||||
(current_slot + effective_delay_slots).epoch(E::slots_per_epoch()) + 1;
|
||||
self.epoch_validator_custody_requirements
|
||||
|
||||
Reference in New Issue
Block a user