Removed all disable_forks (#2925)
#2923 Which issue # does this PR address? There's a redundant field on the BeaconChain called disabled_forks that was once part of our fork-aware networking (#953) but which is no longer used and could be deleted. so Removed all references to disabled_forks so that the code compiles and git grep disabled_forks returns no results. ## Proposed Changes Please list or describe the changes introduced by this PR. Removed all references of disabled_forks Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com>
This commit is contained in:
parent
fc7a1a7dc7
commit
f0f327af0c
@ -336,8 +336,6 @@ pub struct BeaconChain<T: BeaconChainTypes> {
|
|||||||
pub early_attester_cache: EarlyAttesterCache<T::EthSpec>,
|
pub early_attester_cache: EarlyAttesterCache<T::EthSpec>,
|
||||||
/// A cache used to keep track of various block timings.
|
/// A cache used to keep track of various block timings.
|
||||||
pub block_times_cache: Arc<RwLock<BlockTimesCache>>,
|
pub block_times_cache: Arc<RwLock<BlockTimesCache>>,
|
||||||
/// A list of any hard-coded forks that have been disabled.
|
|
||||||
pub disabled_forks: Vec<String>,
|
|
||||||
/// Sender given to tasks, so that if they encounter a state in which execution cannot
|
/// Sender given to tasks, so that if they encounter a state in which execution cannot
|
||||||
/// continue they can request that everything shuts down.
|
/// continue they can request that everything shuts down.
|
||||||
pub shutdown_sender: Sender<ShutdownReason>,
|
pub shutdown_sender: Sender<ShutdownReason>,
|
||||||
|
@ -84,7 +84,6 @@ pub struct BeaconChainBuilder<T: BeaconChainTypes> {
|
|||||||
validator_pubkey_cache: Option<ValidatorPubkeyCache<T>>,
|
validator_pubkey_cache: Option<ValidatorPubkeyCache<T>>,
|
||||||
spec: ChainSpec,
|
spec: ChainSpec,
|
||||||
chain_config: ChainConfig,
|
chain_config: ChainConfig,
|
||||||
disabled_forks: Vec<String>,
|
|
||||||
log: Option<Logger>,
|
log: Option<Logger>,
|
||||||
graffiti: Graffiti,
|
graffiti: Graffiti,
|
||||||
slasher: Option<Arc<Slasher<T::EthSpec>>>,
|
slasher: Option<Arc<Slasher<T::EthSpec>>>,
|
||||||
@ -122,7 +121,6 @@ where
|
|||||||
slot_clock: None,
|
slot_clock: None,
|
||||||
shutdown_sender: None,
|
shutdown_sender: None,
|
||||||
head_tracker: None,
|
head_tracker: None,
|
||||||
disabled_forks: Vec::new(),
|
|
||||||
validator_pubkey_cache: None,
|
validator_pubkey_cache: None,
|
||||||
spec: TEthSpec::default_spec(),
|
spec: TEthSpec::default_spec(),
|
||||||
chain_config: ChainConfig::default(),
|
chain_config: ChainConfig::default(),
|
||||||
@ -184,13 +182,6 @@ where
|
|||||||
self.log = Some(log);
|
self.log = Some(log);
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets a list of hard-coded forks that will not be activated.
|
|
||||||
pub fn disabled_forks(mut self, disabled_forks: Vec<String>) -> Self {
|
|
||||||
self.disabled_forks = disabled_forks;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Attempt to load an existing eth1 cache from the builder's `Store`.
|
/// Attempt to load an existing eth1 cache from the builder's `Store`.
|
||||||
pub fn get_persisted_eth1_backend(&self) -> Result<Option<SszEth1>, String> {
|
pub fn get_persisted_eth1_backend(&self) -> Result<Option<SszEth1>, String> {
|
||||||
let store = self
|
let store = self
|
||||||
@ -764,7 +755,6 @@ where
|
|||||||
validator_pubkey_cache: TimeoutRwLock::new(validator_pubkey_cache),
|
validator_pubkey_cache: TimeoutRwLock::new(validator_pubkey_cache),
|
||||||
attester_cache: <_>::default(),
|
attester_cache: <_>::default(),
|
||||||
early_attester_cache: <_>::default(),
|
early_attester_cache: <_>::default(),
|
||||||
disabled_forks: self.disabled_forks,
|
|
||||||
shutdown_sender: self
|
shutdown_sender: self
|
||||||
.shutdown_sender
|
.shutdown_sender
|
||||||
.ok_or("Cannot build without a shutdown sender.")?,
|
.ok_or("Cannot build without a shutdown sender.")?,
|
||||||
|
@ -135,7 +135,6 @@ where
|
|||||||
let chain_spec = self.chain_spec.clone();
|
let chain_spec = self.chain_spec.clone();
|
||||||
let runtime_context = self.runtime_context.clone();
|
let runtime_context = self.runtime_context.clone();
|
||||||
let eth_spec_instance = self.eth_spec_instance.clone();
|
let eth_spec_instance = self.eth_spec_instance.clone();
|
||||||
let disabled_forks = config.disabled_forks.clone();
|
|
||||||
let chain_config = config.chain.clone();
|
let chain_config = config.chain.clone();
|
||||||
let graffiti = config.graffiti;
|
let graffiti = config.graffiti;
|
||||||
|
|
||||||
@ -169,7 +168,6 @@ where
|
|||||||
.store(store)
|
.store(store)
|
||||||
.custom_spec(spec.clone())
|
.custom_spec(spec.clone())
|
||||||
.chain_config(chain_config)
|
.chain_config(chain_config)
|
||||||
.disabled_forks(disabled_forks)
|
|
||||||
.graffiti(graffiti)
|
.graffiti(graffiti)
|
||||||
.event_handler(event_handler)
|
.event_handler(event_handler)
|
||||||
.execution_layer(execution_layer)
|
.execution_layer(execution_layer)
|
||||||
|
@ -58,8 +58,6 @@ pub struct Config {
|
|||||||
/// This is the method used for the 2019 client interop in Canada.
|
/// This is the method used for the 2019 client interop in Canada.
|
||||||
pub dummy_eth1_backend: bool,
|
pub dummy_eth1_backend: bool,
|
||||||
pub sync_eth1_chain: bool,
|
pub sync_eth1_chain: bool,
|
||||||
/// A list of hard-coded forks that will be disabled.
|
|
||||||
pub disabled_forks: Vec<String>,
|
|
||||||
/// Graffiti to be inserted everytime we create a block.
|
/// Graffiti to be inserted everytime we create a block.
|
||||||
pub graffiti: Graffiti,
|
pub graffiti: Graffiti,
|
||||||
/// When true, automatically monitor validators using the HTTP API.
|
/// When true, automatically monitor validators using the HTTP API.
|
||||||
@ -98,7 +96,6 @@ impl Default for Config {
|
|||||||
eth1: <_>::default(),
|
eth1: <_>::default(),
|
||||||
execution_endpoints: None,
|
execution_endpoints: None,
|
||||||
suggested_fee_recipient: None,
|
suggested_fee_recipient: None,
|
||||||
disabled_forks: Vec::new(),
|
|
||||||
graffiti: Graffiti::default(),
|
graffiti: Graffiti::default(),
|
||||||
http_api: <_>::default(),
|
http_api: <_>::default(),
|
||||||
http_metrics: <_>::default(),
|
http_metrics: <_>::default(),
|
||||||
|
Loading…
Reference in New Issue
Block a user