From 7135b3d858043dc4a514a283f23e834304162bb5 Mon Sep 17 00:00:00 2001 From: Brian Balser Date: Sun, 3 Nov 2024 11:02:31 -0500 Subject: [PATCH] When updating seniority due to new coverage object, skip if previous seniority update was due to ban --- mobile_verifier/src/seniority.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mobile_verifier/src/seniority.rs b/mobile_verifier/src/seniority.rs index b17ba3ab6..f51180b83 100644 --- a/mobile_verifier/src/seniority.rs +++ b/mobile_verifier/src/seniority.rs @@ -88,7 +88,8 @@ impl<'a> SeniorityUpdate<'a> { if let Some(prev_seniority) = latest_seniority { if heartbeat.heartbeat.coverage_object != Some(prev_seniority.uuid) { - if prev_seniority.update_reason == HeartbeatNotSeen as i32 + if [HeartbeatNotSeen as i32, ServiceProviderBan as i32] + .contains(&prev_seniority.update_reason) && coverage_claim_time < prev_seniority.seniority_ts { Self::from_heartbeat(heartbeat, SeniorityUpdateAction::NoAction)