Skip to content

Commit 5393d33

Browse files
authored
Silence Uninitialized warn log on start-up (#7411)
#7410 Silences the `Uninitialized` warn log during routine beacon node health check.
1 parent 7684d1f commit 5393d33

File tree

1 file changed

+20
-6
lines changed
  • validator_client/beacon_node_fallback/src

1 file changed

+20
-6
lines changed

validator_client/beacon_node_fallback/src/lib.rs

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,26 @@ impl<T: SlotClock> BeaconNodeFallback<T> {
482482

483483
for (result, node) in results {
484484
if let Err(e) = result {
485-
if *e != CandidateError::PreGenesis {
486-
warn!(
487-
error = ?e,
488-
endpoint = %node,
489-
"A connected beacon node errored during routine health check"
490-
);
485+
match e {
486+
// Avoid spamming warns before genesis.
487+
CandidateError::PreGenesis => {}
488+
// Uninitialized *should* only occur during start-up before the
489+
// slot clock has been initialized.
490+
// Seeing this log in any other circumstance would indicate a serious bug.
491+
CandidateError::Uninitialized => {
492+
debug!(
493+
error = ?e,
494+
endpoint = %node,
495+
"A connected beacon node is uninitialized"
496+
);
497+
}
498+
_ => {
499+
warn!(
500+
error = ?e,
501+
endpoint = %node,
502+
"A connected beacon node errored during routine health check"
503+
);
504+
}
491505
}
492506
}
493507
}

0 commit comments

Comments
 (0)