mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +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:
@@ -21,7 +21,6 @@ use futures::TryFutureExt;
|
||||
use lighthouse_network::PubsubMessage;
|
||||
use network::NetworkMessage;
|
||||
use rand::prelude::SliceRandom;
|
||||
use slot_clock::SlotClock;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
@@ -771,7 +770,7 @@ fn late_block_logging<T: BeaconChainTypes, P: AbstractExecPayload<T::EthSpec>>(
|
||||
//
|
||||
// Check to see the thresholds are non-zero to avoid logging errors with small
|
||||
// slot times (e.g., during testing)
|
||||
let too_late_threshold = chain.slot_clock.unagg_attestation_production_delay();
|
||||
let too_late_threshold = chain.spec.get_unaggregated_attestation_due();
|
||||
let delayed_threshold = too_late_threshold / 2;
|
||||
if delay >= too_late_threshold {
|
||||
error!(
|
||||
|
||||
@@ -235,6 +235,7 @@ pub fn process_sync_committee_signatures<T: BeaconChainTypes>(
|
||||
seen_timestamp,
|
||||
verified.sync_message(),
|
||||
&chain.slot_clock,
|
||||
&chain.spec,
|
||||
);
|
||||
|
||||
verified_for_pool = Some(verified);
|
||||
@@ -376,6 +377,7 @@ pub fn process_signed_contribution_and_proofs<T: BeaconChainTypes>(
|
||||
verified_contribution.aggregate(),
|
||||
verified_contribution.participant_pubkeys(),
|
||||
&chain.slot_clock,
|
||||
&chain.spec,
|
||||
);
|
||||
|
||||
verified_contributions.push((index, verified_contribution));
|
||||
|
||||
@@ -862,6 +862,7 @@ pub fn post_validator_aggregate_and_proofs<T: BeaconChainTypes>(
|
||||
verified_aggregate.aggregate(),
|
||||
verified_aggregate.indexed_attestation(),
|
||||
&chain.slot_clock,
|
||||
&chain.spec,
|
||||
);
|
||||
|
||||
verified_aggregates.push((index, verified_aggregate));
|
||||
|
||||
Reference in New Issue
Block a user