Fix UnableToReadSlot
at startup (#3066)
## Issue Addressed Don't send an fcU message at startup if it's pre-genesis. The startup fcU message is not critical, not required by the spec, so it's fine to avoid it for networks that start post-Bellatrix fork.
This commit is contained in:
parent
65eaf01942
commit
c475499dfe
@ -662,14 +662,12 @@ where
|
||||
);
|
||||
|
||||
if let Some(execution_layer) = beacon_chain.execution_layer.as_ref() {
|
||||
// Only send a head update *after* genesis.
|
||||
if let Ok(current_slot) = beacon_chain.slot() {
|
||||
let head = beacon_chain
|
||||
.head_info()
|
||||
.map_err(|e| format!("Unable to read beacon chain head: {:?}", e))?;
|
||||
|
||||
let current_slot = beacon_chain
|
||||
.slot()
|
||||
.map_err(|e| format!("Unable to read slot: {:?}", e))?;
|
||||
|
||||
// Issue the head to the execution engine on startup. This ensures it can start
|
||||
// syncing.
|
||||
if head
|
||||
@ -706,13 +704,15 @@ where
|
||||
execution_layer.spawn_watchdog_routine(beacon_chain.slot_clock.clone());
|
||||
|
||||
// Spawn a routine that removes expired proposer preparations.
|
||||
execution_layer.spawn_clean_proposer_preparation_routine::<TSlotClock, TEthSpec>(
|
||||
execution_layer
|
||||
.spawn_clean_proposer_preparation_routine::<TSlotClock, TEthSpec>(
|
||||
beacon_chain.slot_clock.clone(),
|
||||
);
|
||||
|
||||
// Spawns a routine that polls the `exchange_transition_configuration` endpoint.
|
||||
execution_layer.spawn_transition_configuration_poll(beacon_chain.spec.clone());
|
||||
}
|
||||
}
|
||||
|
||||
start_proposer_prep_service(runtime_context.executor.clone(), beacon_chain.clone());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user