Skip to content

Commit cbb7db4

Browse files
committed
Remove another redundant removal of coordinator id
1 parent bc17d08 commit cbb7db4

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

trust-quorum/src/coordinator_state.rs

-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ impl CoordinatorState {
198198
}
199199
CoordinatorOperation::CollectLrtqShares { .. } => {}
200200
CoordinatorOperation::Prepare { prepares, .. } => {
201-
// prepares already filter ourself
202201
for (platform_id, prepare) in prepares.clone().into_iter() {
203202
outbox.push(Envelope {
204203
to: platform_id,

trust-quorum/tests/coordinator.rs

+10-15
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,8 @@ impl Model {
189189
};
190190

191191
// Return all members of the current configuration that haven't acked a
192-
// `PrepareMsg` yet. Exclude ourself.
193-
194-
let mut waiting_for: BTreeSet<_> =
195-
cs.msg.members.difference(acked_prepares).cloned().collect();
196-
waiting_for.remove(&self.id);
197-
Some(waiting_for)
192+
// `PrepareMsg` yet.
193+
Some(cs.msg.members.difference(acked_prepares).cloned().collect())
198194
}
199195

200196
// Return the nodes that we are waiting for shares from
@@ -214,15 +210,14 @@ impl Model {
214210
};
215211

216212
// Return all members of the last committed configuration that we
217-
// haven't received a share from yet. Exclude ourself.
218-
219-
let mut waiting_for: BTreeSet<_> = last_committed_config_msg
220-
.members
221-
.difference(collected_from)
222-
.cloned()
223-
.collect();
224-
waiting_for.remove(&self.id);
225-
Some(waiting_for)
213+
// haven't received a share from yet.
214+
Some(
215+
last_committed_config_msg
216+
.members
217+
.difference(collected_from)
218+
.cloned()
219+
.collect(),
220+
)
226221
}
227222

228223
// Return the current epoch being coordinated, if there is one

0 commit comments

Comments
 (0)