From 71c49bc8cd651c67385fdbb1e4fdba2d3a5fb33a Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 21 Jun 2021 13:53:25 -0600 Subject: [PATCH] Add logging when RpcHealthStatus::Unknown (#18098) (#18107) (cherry picked from commit faecc41603ea824abbddcba64641b5b57751c493) Co-authored-by: Tyera Eulberg --- rpc/src/rpc_health.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rpc/src/rpc_health.rs b/rpc/src/rpc_health.rs index 4317741b5e..e4b2b99b79 100644 --- a/rpc/src/rpc_health.rs +++ b/rpc/src/rpc_health.rs @@ -98,7 +98,15 @@ impl RpcHealth { RpcHealthStatus::Behind { num_slots } } } - _ => RpcHealthStatus::Unknown, + (latest_account_hash_slot, latest_trusted_validator_account_hash_slot) => { + if latest_account_hash_slot.is_none() { + warn!("health check: latest_account_hash_slot not available"); + } + if latest_trusted_validator_account_hash_slot.is_none() { + warn!("health check: latest_trusted_validator_account_hash_slot not available"); + } + RpcHealthStatus::Unknown + } } } else { // No trusted validator point of reference available, so this validator is healthy