mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 22:34:45 +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:
@@ -1144,13 +1144,14 @@ pub fn verify_propagation_slot_range<S: SlotClock, E: EthSpec>(
|
||||
|
||||
let current_fork =
|
||||
spec.fork_name_at_slot::<E>(slot_clock.now().ok_or(BeaconChainError::UnableToReadSlot)?);
|
||||
let earliest_permissible_slot = if !current_fork.deneb_enabled() {
|
||||
one_epoch_prior
|
||||
// EIP-7045
|
||||
} else {
|
||||
|
||||
let earliest_permissible_slot = if current_fork.deneb_enabled() {
|
||||
// EIP-7045
|
||||
one_epoch_prior
|
||||
.epoch(E::slots_per_epoch())
|
||||
.start_slot(E::slots_per_epoch())
|
||||
} else {
|
||||
one_epoch_prior
|
||||
};
|
||||
|
||||
if attestation_slot < earliest_permissible_slot {
|
||||
|
||||
Reference in New Issue
Block a user