mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-23 23:04:53 +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:
@@ -443,7 +443,7 @@ pub fn gossipsub_config(
|
||||
network_load: u8,
|
||||
fork_context: Arc<ForkContext>,
|
||||
gossipsub_config_params: GossipsubConfigParams,
|
||||
seconds_per_slot: u64,
|
||||
slot_duration: Duration,
|
||||
slots_per_epoch: u64,
|
||||
idontwant_message_size_threshold: usize,
|
||||
) -> gossipsub::Config {
|
||||
@@ -487,7 +487,7 @@ pub fn gossipsub_config(
|
||||
// To accommodate the increase, we should increase the duplicate cache time to filter older seen messages.
|
||||
// 2 epochs is quite sane for pre-deneb network parameters as well.
|
||||
// Hence we keep the same parameters for pre-deneb networks as well to avoid switching at the fork.
|
||||
let duplicate_cache_time = Duration::from_secs(slots_per_epoch * seconds_per_slot * 2);
|
||||
let duplicate_cache_time = Duration::from_secs(slots_per_epoch * slot_duration.as_secs() * 2);
|
||||
|
||||
gossipsub::ConfigBuilder::default()
|
||||
.max_transmit_size(gossipsub_config_params.gossipsub_max_transmit_size)
|
||||
|
||||
Reference in New Issue
Block a user