Skip to content

Commit

Permalink
When updating seniority due to new coverage object, skip if previous …
Browse files Browse the repository at this point in the history
…seniority update was due to ban
  • Loading branch information
bbalser committed Nov 3, 2024
1 parent 870a040 commit 7135b3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mobile_verifier/src/seniority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7135b3d

Please sign in to comment.