caio.co/de/foca

Use choice_buf when announcing to down members

Doesn't really matter which buf is used here since there's no
interaction, but choice_buf is the right one to prevent confusion
before I properly clean this mess.
Id
45cb925dde69543ee5854f29fc8d1e940beb6d28
Author
Caio
Commit time
2024-10-06T13:07:30+02:00

Modified src/lib.rs

@@ -493,11 +493,11
}

fn announce_to_down(&mut self, num_members: usize, mut runtime: impl Runtime<T>) -> Result<()> {
- self.updates_buf.clear();
+ self.choice_buf.clear();
self.members
- .choose_down_members(num_members, &mut self.updates_buf, &mut self.rng);
+ .choose_down_members(num_members, &mut self.choice_buf, &mut self.rng);

- while let Some(chosen) = self.updates_buf.pop() {
+ while let Some(chosen) = self.choice_buf.pop() {
self.send_message(chosen.into_identity(), Message::Announce, &mut runtime)?;
}