Fixed bugs for m3 readiness (#2669)

* Fixed bugs for m3 readiness

* woops

* cargo fmt..
This commit is contained in:
ethDreamer 2021-10-04 08:17:36 -05:00 committed by Paul Hauner
parent b162b067de
commit 52e5083502
No known key found for this signature in database
GPG Key ID: 5E2CFF9B75FA63DF
2 changed files with 32 additions and 29 deletions

View File

@ -3137,6 +3137,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
.body()
.execution_payload()
.map(|ep| ep.block_hash);
let is_merge_complete = is_merge_complete(&new_head.beacon_state);
drop(lag_timer);
@ -3342,7 +3343,8 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
}
// 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 {
if is_merge_complete {
let execution_layer = self
.execution_layer
.clone()
@ -3357,7 +3359,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
execution_layer,
store,
new_finalized_checkpoint.root,
new_head_execution_block_hash,
block_hash,
)
.await
{
@ -3371,6 +3373,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
"update_execution_engine_forkchoice",
)
}
}
Ok(())
}

View File

@ -249,11 +249,11 @@ pub fn get_config<E: EthSpec>(
}
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() {
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(),
);
}