Skip to content

Commit

Permalink
Switch distance check to be >= instead of just >
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Steven Czabaniuk committed Oct 12, 2023
1 parent bbd90c8 commit 90597ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/src/rpc_health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 90597ed

Please sign in to comment.