mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Shift networking configuration (#4426)
## Issue Addressed Addresses [#4401](https://github.com/sigp/lighthouse/issues/4401) ## Proposed Changes Shift some constants into ```ChainSpec``` and remove the constant values from code space. ## Additional Info I mostly used ```MainnetEthSpec::default_spec()``` for getting ```ChainSpec```. I wonder Did I make a mistake about that. Co-authored-by: armaganyildirak <armaganyildirak@gmail.com> Co-authored-by: Paul Hauner <paul@paulhauner.com> Co-authored-by: Age Manning <Age@AgeManning.com> Co-authored-by: Diva M <divma@protonmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@ use beacon_chain::sync_committee_verification::{
|
||||
};
|
||||
use beacon_chain::{
|
||||
validator_monitor::timestamp_now, BeaconChain, BeaconChainError, BeaconChainTypes,
|
||||
StateSkipConfig, MAXIMUM_GOSSIP_CLOCK_DISPARITY,
|
||||
StateSkipConfig,
|
||||
};
|
||||
use eth2::types::{self as api_types};
|
||||
use lighthouse_network::PubsubMessage;
|
||||
@@ -85,7 +85,7 @@ fn duties_from_state_load<T: BeaconChainTypes>(
|
||||
let current_epoch = chain.epoch()?;
|
||||
let tolerant_current_epoch = chain
|
||||
.slot_clock
|
||||
.now_with_future_tolerance(MAXIMUM_GOSSIP_CLOCK_DISPARITY)
|
||||
.now_with_future_tolerance(chain.spec.maximum_gossip_clock_disparity())
|
||||
.ok_or(BeaconChainError::UnableToReadSlot)?
|
||||
.epoch(T::EthSpec::slots_per_epoch());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user