mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 04:01:51 +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:
@@ -4,7 +4,7 @@ use safe_arith::SafeArith;
|
||||
use state_processing::per_block_processing::get_expected_withdrawals;
|
||||
use state_processing::state_advance::partial_state_advance;
|
||||
use std::sync::Arc;
|
||||
use types::{BeaconState, EthSpec, ForkName, Slot, Withdrawals};
|
||||
use types::{BeaconState, EthSpec, Slot, Withdrawals};
|
||||
|
||||
const MAX_EPOCH_LOOKAHEAD: u64 = 2;
|
||||
|
||||
@@ -53,7 +53,8 @@ fn get_next_withdrawals_sanity_checks<T: BeaconChainTypes>(
|
||||
}
|
||||
|
||||
let fork = chain.spec.fork_name_at_slot::<T::EthSpec>(proposal_slot);
|
||||
if let ForkName::Base | ForkName::Altair | ForkName::Bellatrix = fork {
|
||||
|
||||
if !fork.capella_enabled() {
|
||||
return Err(warp_utils::reject::custom_bad_request(
|
||||
"the specified state is a pre-capella state.".to_string(),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user