mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 19:02:42 +00:00
Single-pass epoch processing (#4483)
This commit is contained in:
@@ -119,8 +119,9 @@ pub fn per_block_processing<T: EthSpec, Payload: AbstractExecPayload<T>>(
|
||||
.map_err(BlockProcessingError::InconsistentStateFork)?;
|
||||
|
||||
// Build epoch cache if it hasn't already been built, or if it is no longer valid
|
||||
initialize_epoch_cache(state, state.current_epoch(), spec)?;
|
||||
initialize_epoch_cache(state, spec)?;
|
||||
initialize_progressive_balances_cache(state, None, spec)?;
|
||||
state.build_slashings_cache()?;
|
||||
|
||||
let verify_signatures = match block_signature_strategy {
|
||||
BlockSignatureStrategy::VerifyBulk => {
|
||||
@@ -242,6 +243,9 @@ pub fn process_block_header<T: EthSpec>(
|
||||
);
|
||||
}
|
||||
|
||||
state
|
||||
.slashings_cache_mut()
|
||||
.update_latest_block_slot(block_header.slot);
|
||||
*state.latest_block_header_mut() = block_header;
|
||||
|
||||
// Verify proposer is not slashed
|
||||
|
||||
Reference in New Issue
Block a user