From 31a0c6d9669a804d9646f2a80b34ffd443e9ae34 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Thu, 7 Mar 2024 23:42:55 +0000 Subject: [PATCH] add test comments --- core/src/banking_stage/consumer.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/banking_stage/consumer.rs b/core/src/banking_stage/consumer.rs index 75c4d1b8386e55..ce3468f3095233 100644 --- a/core/src/banking_stage/consumer.rs +++ b/core/src/banking_stage/consumer.rs @@ -1711,8 +1711,13 @@ mod tests { let poh_simulator = simulate_poh(record_receiver, &poh_recorder); - let (replay_vote_sender, _replay_vote_receiver) = unbounded(); + // Hold onto poh lock so that workers cannot finish recording + // transactions and cannot unlock accounts immediately. This allows + // us to test having parallel workers that have account lock + // conflicts. let poh_lock = poh_recorder.write().unwrap(); + + let (replay_vote_sender, _replay_vote_receiver) = unbounded(); let worker1 = { let bank = bank.clone(); let committer = Committer::new(