From 90597edcd5a66afa0a82867323d5582abce32393 Mon Sep 17 00:00:00 2001 From: Steven Czabaniuk Date: Thu, 12 Oct 2023 00:53:42 -0500 Subject: [PATCH] Switch distance check to be >= instead of just > Doing so allows for a health_check_slot_distance of 0. While this may be stricter than many operator would want to actually use on nodes, TestValidator uses a value of 0 so we need this for unit tests. --- rpc/src/rpc_health.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/src/rpc_health.rs b/rpc/src/rpc_health.rs index 9e47893e7f7d9a..a710d241cd107a 100644 --- a/rpc/src/rpc_health.rs +++ b/rpc/src/rpc_health.rs @@ -96,7 +96,7 @@ impl RpcHealth { }; if my_latest_optimistically_confirmed_slot - > cluster_latest_optimistically_confirmed_slot + >= cluster_latest_optimistically_confirmed_slot .saturating_sub(self.health_check_slot_distance) { RpcHealthStatus::Ok