From 5393d33af823f14a28cdb1d4960eafe21255d026 Mon Sep 17 00:00:00 2001 From: Mac L Date: Mon, 19 May 2025 15:05:18 +1000 Subject: [PATCH] Silence `Uninitialized` warn log on start-up (#7411) #7410 Silences the `Uninitialized` warn log during routine beacon node health check. --- .../beacon_node_fallback/src/lib.rs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/validator_client/beacon_node_fallback/src/lib.rs b/validator_client/beacon_node_fallback/src/lib.rs index 8d022f8e75..e11cc97e79 100644 --- a/validator_client/beacon_node_fallback/src/lib.rs +++ b/validator_client/beacon_node_fallback/src/lib.rs @@ -482,12 +482,26 @@ impl BeaconNodeFallback { for (result, node) in results { if let Err(e) = result { - if *e != CandidateError::PreGenesis { - warn!( - error = ?e, - endpoint = %node, - "A connected beacon node errored during routine health check" - ); + match e { + // Avoid spamming warns before genesis. + CandidateError::PreGenesis => {} + // Uninitialized *should* only occur during start-up before the + // slot clock has been initialized. + // Seeing this log in any other circumstance would indicate a serious bug. + CandidateError::Uninitialized => { + debug!( + error = ?e, + endpoint = %node, + "A connected beacon node is uninitialized" + ); + } + _ => { + warn!( + error = ?e, + endpoint = %node, + "A connected beacon node errored during routine health check" + ); + } } } }