mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 21:08:32 +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:
@@ -856,6 +856,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
.as_utf8_lossy(),
|
||||
&self.slot_clock,
|
||||
self.event_handler.as_ref(),
|
||||
&self.spec,
|
||||
);
|
||||
|
||||
if is_epoch_transition || reorg_distance.is_some() {
|
||||
@@ -1292,6 +1293,7 @@ fn observe_head_block_delays<E: EthSpec, S: SlotClock>(
|
||||
head_block_graffiti: String,
|
||||
slot_clock: &S,
|
||||
event_handler: Option<&ServerSentEventHandler<E>>,
|
||||
spec: &ChainSpec,
|
||||
) {
|
||||
let Some(block_time_set_as_head) = slot_clock.now_duration() else {
|
||||
// Practically unreachable: the slot clock's time should not be before the UNIX epoch.
|
||||
@@ -1421,7 +1423,7 @@ fn observe_head_block_delays<E: EthSpec, S: SlotClock>(
|
||||
|
||||
// Determine whether the block has been set as head too late for proper attestation
|
||||
// production.
|
||||
let late_head = attestable_delay >= slot_clock.unagg_attestation_production_delay();
|
||||
let late_head = attestable_delay >= spec.get_unaggregated_attestation_due();
|
||||
|
||||
// If the block was enshrined as head too late for attestations to be created for it,
|
||||
// log a debug warning and increment a metric.
|
||||
|
||||
Reference in New Issue
Block a user