From a778a50ec73a2892d9faab41063add259d966f42 Mon Sep 17 00:00:00 2001 From: clabby Date: Sun, 15 Oct 2023 15:24:37 -0400 Subject: [PATCH] :broom: --- crates/consensus/beacon/src/engine/mod.rs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/crates/consensus/beacon/src/engine/mod.rs b/crates/consensus/beacon/src/engine/mod.rs index 0a1f7033152a..15183f843030 100644 --- a/crates/consensus/beacon/src/engine/mod.rs +++ b/crates/consensus/beacon/src/engine/mod.rs @@ -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 { @@ -684,6 +689,11 @@ where elapsed, ), ); + } else { + ignore_update_log( + header.number, + self.blockchain.canonical_tip().number, + ); } } CanonicalOutcome::Committed { ref head } => {