From 7bb347faac69389043b4588562387c91cb65cd54 Mon Sep 17 00:00:00 2001 From: sakridge Date: Thu, 28 Oct 2021 06:14:36 -0700 Subject: [PATCH] Tone down the optimistic confirmation printing (#21045) --- local-cluster/tests/local_cluster.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/local-cluster/tests/local_cluster.rs b/local-cluster/tests/local_cluster.rs index 35a23f03a6..7a8b8add4f 100644 --- a/local-cluster/tests/local_cluster.rs +++ b/local-cluster/tests/local_cluster.rs @@ -3397,6 +3397,7 @@ fn do_test_optimistic_confirmation_violation_with_or_without_tower(with_tower: b ); info!("Waiting for A to vote"); + let mut last_print = Instant::now(); loop { if let Some((last_vote_slot, _)) = last_vote_in_tower(&val_a_ledger_path, &validator_a_pubkey) @@ -3404,8 +3405,9 @@ fn do_test_optimistic_confirmation_violation_with_or_without_tower(with_tower: b if last_vote_slot >= next_slot_on_a { info!("Validator A has caught up: {}", last_vote_slot); break; - } else { + } else if last_print.elapsed().as_secs() >= 10 { info!("Validator A latest vote: {}", last_vote_slot); + last_print = Instant::now(); } }