mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Add {fork_name}_enabled functions (#5951)
* add fork_name_enabled fn to Forkname impl * refactor codebase to use new fork_enabled fn * fmt * Merge branch 'unstable' of https://github.com/sigp/lighthouse into fork-ord-impl * small code cleanup * resolve merge conflicts * fix beacon chain test * merge conflicts * fix ef test issue * resolve merge conflicts
This commit is contained in:
@@ -270,7 +270,7 @@ impl<E: EthSpec> Operation<E> for SyncAggregate<E> {
|
||||
}
|
||||
|
||||
fn is_enabled_for_fork(fork_name: ForkName) -> bool {
|
||||
fork_name != ForkName::Base
|
||||
fork_name.altair_enabled()
|
||||
}
|
||||
|
||||
fn decode(path: &Path, _fork_name: ForkName, _spec: &ChainSpec) -> Result<Self, Error> {
|
||||
|
||||
@@ -967,8 +967,8 @@ impl<E: EthSpec + TypeName> Handler for KzgInclusionMerkleProofValidityHandler<E
|
||||
}
|
||||
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
// Enabled in Deneb
|
||||
fork_name == ForkName::Deneb
|
||||
// TODO(electra) re-enable for electra once merkle proof issues for electra are resolved
|
||||
fork_name.deneb_enabled() && !fork_name.electra_enabled()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,7 +994,7 @@ impl<E: EthSpec + TypeName> Handler for LightClientUpdateHandler<E> {
|
||||
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
|
||||
// Enabled in Altair
|
||||
// TODO(electra) re-enable once https://github.com/sigp/lighthouse/issues/6002 is resolved
|
||||
fork_name != ForkName::Base && fork_name != ForkName::Electra
|
||||
fork_name.altair_enabled() && fork_name != ForkName::Electra
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user