Skip to content

Commit

Permalink
Fix duplicates in thread ancestor subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedilger committed Oct 1, 2023
1 parent 3d65466 commit 213f5f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/overlord/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1728,8 +1728,10 @@ impl Overlord {
}
}

let missing_ancestors_hex: Vec<IdHex> =
let mut missing_ancestors_hex: Vec<IdHex> =
missing_ancestors.iter().map(|id| (*id).into()).collect();
missing_ancestors_hex.sort_by(|a,b| a.as_str().cmp(b.as_str()));
missing_ancestors_hex.dedup();

// Subscribe on relays
if relays.is_empty() {
Expand Down

0 comments on commit 213f5f3

Please sign in to comment.