Skip to content

Commit

Permalink
fixup! Fix fork race condition in optimistic violation tower tests (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
steviez authored Aug 27, 2021
1 parent 73c1ea7 commit aab2df2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions local-cluster/tests/local_cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,10 @@ fn test_fork_choice_refresh_old_votes() {
&lighter_fork_ledger_path,
&context.lighter_fork_validator_key,
);
let heaviest_fork_latest_vote =
wait_for_last_vote_in_tower_to_land_in_ledger(&heaviest_ledger_path, &context.heaviest_validator_key);
let heaviest_fork_latest_vote = wait_for_last_vote_in_tower_to_land_in_ledger(
&heaviest_ledger_path,
&context.heaviest_validator_key,
);

// Open ledgers
let smallest_blockstore = open_blockstore(&smallest_ledger_path);
Expand Down Expand Up @@ -2807,7 +2809,8 @@ fn do_test_optimistic_confirmation_violation_with_or_without_tower(with_tower: b
info!("Create validator A's ledger");
{
// Find latest vote in B, and wait for it to reach blockstore
let b_last_vote = wait_for_last_vote_in_tower_to_land_in_ledger(&val_b_ledger_path, &validator_b_pubkey);
let b_last_vote =
wait_for_last_vote_in_tower_to_land_in_ledger(&val_b_ledger_path, &validator_b_pubkey);

// Now we copy these blocks to A
let b_blockstore = open_blockstore(&val_b_ledger_path);
Expand Down

0 comments on commit aab2df2

Please sign in to comment.