Fixed bugs for m3 readiness (#2669)
* Fixed bugs for m3 readiness * woops * cargo fmt..
This commit is contained in:
parent
b162b067de
commit
52e5083502
@ -3137,6 +3137,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
.body()
|
.body()
|
||||||
.execution_payload()
|
.execution_payload()
|
||||||
.map(|ep| ep.block_hash);
|
.map(|ep| ep.block_hash);
|
||||||
|
let is_merge_complete = is_merge_complete(&new_head.beacon_state);
|
||||||
|
|
||||||
drop(lag_timer);
|
drop(lag_timer);
|
||||||
|
|
||||||
@ -3342,34 +3343,36 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If this is a post-merge block, update the execution layer.
|
// If this is a post-merge block, update the execution layer.
|
||||||
if let Some(new_head_execution_block_hash) = new_head_execution_block_hash {
|
if let Some(block_hash) = new_head_execution_block_hash {
|
||||||
let execution_layer = self
|
if is_merge_complete {
|
||||||
.execution_layer
|
let execution_layer = self
|
||||||
.clone()
|
.execution_layer
|
||||||
.ok_or(Error::ExecutionLayerMissing)?;
|
.clone()
|
||||||
let store = self.store.clone();
|
.ok_or(Error::ExecutionLayerMissing)?;
|
||||||
let log = self.log.clone();
|
let store = self.store.clone();
|
||||||
|
let log = self.log.clone();
|
||||||
|
|
||||||
// Spawn the update task, without waiting for it to complete.
|
// Spawn the update task, without waiting for it to complete.
|
||||||
execution_layer.spawn(
|
execution_layer.spawn(
|
||||||
move |execution_layer| async move {
|
move |execution_layer| async move {
|
||||||
if let Err(e) = Self::update_execution_engine_forkchoice(
|
if let Err(e) = Self::update_execution_engine_forkchoice(
|
||||||
execution_layer,
|
execution_layer,
|
||||||
store,
|
store,
|
||||||
new_finalized_checkpoint.root,
|
new_finalized_checkpoint.root,
|
||||||
new_head_execution_block_hash,
|
block_hash,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
{
|
{
|
||||||
error!(
|
error!(
|
||||||
log,
|
log,
|
||||||
"Failed to update execution head";
|
"Failed to update execution head";
|
||||||
"error" => ?e
|
"error" => ?e
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"update_execution_engine_forkchoice",
|
"update_execution_engine_forkchoice",
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -249,11 +249,11 @@ pub fn get_config<E: EthSpec>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let Some(terminal_total_difficulty) =
|
if let Some(terminal_total_difficulty) =
|
||||||
clap_utils::parse_optional(cli_args, "total-terminal-difficulty-override")?
|
clap_utils::parse_optional(cli_args, "terminal-total-difficulty-override")?
|
||||||
{
|
{
|
||||||
if client_config.execution_endpoints.is_none() {
|
if client_config.execution_endpoints.is_none() {
|
||||||
return Err(
|
return Err(
|
||||||
"The --merge flag must be provided when using --total-terminal-difficulty-override"
|
"The --merge flag must be provided when using --terminal-total-difficulty-override"
|
||||||
.into(),
|
.into(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user