Silence Uninitialized warn log on start-up (#7411)

#7410


  Silences the `Uninitialized` warn log during routine beacon node health check.
This commit is contained in:
Mac L
2025-05-19 15:05:18 +10:00
committed by GitHub
parent 7684d1f866
commit 5393d33af8

View File

@@ -482,12 +482,26 @@ impl<T: SlotClock> BeaconNodeFallback<T> {
for (result, node) in results { for (result, node) in results {
if let Err(e) = result { if let Err(e) = result {
if *e != CandidateError::PreGenesis { match e {
warn!( // Avoid spamming warns before genesis.
error = ?e, CandidateError::PreGenesis => {}
endpoint = %node, // Uninitialized *should* only occur during start-up before the
"A connected beacon node errored during routine health check" // 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"
);
}
} }
} }
} }