Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit c044777

Browse files
committed
Break outer
1 parent 118c0c4 commit c044777

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

local-cluster/tests/local_cluster.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,12 +1821,10 @@ fn do_test_optimistic_confirmation_violation_with_or_without_tower(with_tower: b
18211821
None,
18221822
)
18231823
.unwrap();
1824-
let ancestors = AncestorIterator::new(last_vote, &blockstore);
1825-
for a in ancestors {
1826-
if votes_on_c_fork.contains(&a) {
1827-
bad_vote_detected = true;
1828-
break;
1829-
}
1824+
let mut ancestors = AncestorIterator::new(last_vote, &blockstore);
1825+
if ancestors.any(|a| votes_on_c_fork.contains(&a)) {
1826+
bad_vote_detected = true;
1827+
break;
18301828
}
18311829
}
18321830
}

0 commit comments

Comments
 (0)