Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
🧹
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Oct 15, 2023
1 parent 9cc55d5 commit a778a50
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions crates/consensus/beacon/src/engine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,13 +661,18 @@ where
Ok(outcome) => {
match outcome {
CanonicalOutcome::AlreadyCanonical { ref header } => {
#[inline(always)]
fn ignore_update_log(header_num: u64, canonical_tip_num: u64) {
debug!(
target: "consensus::engine",
fcu_head_num=?header_num,
current_head_num=?canonical_tip_num,
"Ignoring beacon update to old head"
);
}

#[cfg(not(feature = "optimism"))]
debug!(
target: "consensus::engine",
fcu_head_num=?header.number,
current_head_num=?self.blockchain.canonical_tip().number,
"Ignoring beacon update to old head"
);
ignore_update_log(header.number, self.blockchain.canonical_tip().number);

#[cfg(feature = "optimism")]
if self.chain_spec().optimism {
Expand All @@ -684,6 +689,11 @@ where
elapsed,
),
);
} else {
ignore_update_log(
header.number,
self.blockchain.canonical_tip().number,
);
}
}
CanonicalOutcome::Committed { ref head } => {
Expand Down

0 comments on commit a778a50

Please sign in to comment.