mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Simplify ConfigAndPreset (#7777)
I noticed that we are serving preset values for Fulu on mainnet nodes prior to the fork. This has already gone live in v7.1.0, but should hopefully be handled in a graceful way by API consumers. This PR _reverts_ the serving of Fulu data prior to Fulu, by serving Fulu data only if Fulu is scheduled.
This commit is contained in:
@@ -41,7 +41,7 @@ impl<E: EthSpec> MockBeaconNode<E> {
|
||||
|
||||
pub fn mock_config_spec(&mut self, spec: &ChainSpec) {
|
||||
let path_pattern = Regex::new(r"^/eth/v1/config/spec$").unwrap();
|
||||
let config_and_preset = ConfigAndPreset::from_chain_spec::<E>(spec, None);
|
||||
let config_and_preset = ConfigAndPreset::from_chain_spec::<E>(spec);
|
||||
let data = GenericResponse::from(config_and_preset);
|
||||
self.server
|
||||
.mock("GET", Matcher::Regex(path_pattern.to_string()))
|
||||
|
||||
Reference in New Issue
Block a user