mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +00:00
Add Fulu boilerplate (#6695)
* Add Fulu boilerplate * Add more boilerplate * Change fulu_time to osaka_time * Merge branch 'unstable' into fulu-boilerplate * Fix tests * Merge branch 'unstable' into fulu-boilerplate * More test fixes * Apply suggestions * Remove `get_payload` boilerplate * Add lightclient fulu types and fix beacon-chain-tests * Disable Fulu in ef-tests * Reduce boilerplate for future forks * Small fixes * One more fix * Apply suggestions * Merge branch 'unstable' into fulu-boilerplate * Fix lints
This commit is contained in:
@@ -755,20 +755,15 @@ where
|
||||
if let Some((parent_justified, parent_finalized)) = parent_checkpoints {
|
||||
(parent_justified, parent_finalized)
|
||||
} else {
|
||||
let justification_and_finalization_state = match block {
|
||||
BeaconBlockRef::Electra(_)
|
||||
| BeaconBlockRef::Deneb(_)
|
||||
| BeaconBlockRef::Capella(_)
|
||||
| BeaconBlockRef::Bellatrix(_)
|
||||
| BeaconBlockRef::Altair(_) => {
|
||||
let justification_and_finalization_state =
|
||||
if block.fork_name_unchecked().altair_enabled() {
|
||||
// NOTE: Processing justification & finalization requires the progressive
|
||||
// balances cache, but we cannot initialize it here as we only have an
|
||||
// immutable reference. The state *should* have come straight from block
|
||||
// processing, which initialises the cache, but if we add other `on_block`
|
||||
// calls in future it could be worth passing a mutable reference.
|
||||
per_epoch_processing::altair::process_justification_and_finalization(state)?
|
||||
}
|
||||
BeaconBlockRef::Base(_) => {
|
||||
} else {
|
||||
let mut validator_statuses =
|
||||
per_epoch_processing::base::ValidatorStatuses::new(state, spec)
|
||||
.map_err(Error::ValidatorStatuses)?;
|
||||
@@ -780,8 +775,7 @@ where
|
||||
&validator_statuses.total_balances,
|
||||
spec,
|
||||
)?
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
(
|
||||
justification_and_finalization_state.current_justified_checkpoint(),
|
||||
|
||||
Reference in New Issue
Block a user