From b3f71d08eb4ed0906d7fe83ba621b6be9a4597d5 Mon Sep 17 00:00:00 2001 From: ksolana <110843012+ksolana@users.noreply.github.com> Date: Thu, 16 Jan 2025 05:49:51 +0000 Subject: [PATCH] Prefix sender and receiver with working_bank `sender` and `receiver` are a bit generic and reduces readability. --- poh/src/poh_recorder.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/poh/src/poh_recorder.rs b/poh/src/poh_recorder.rs index 2e308ea41b5ea5..c84910802cee8c 100644 --- a/poh/src/poh_recorder.rs +++ b/poh/src/poh_recorder.rs @@ -282,7 +282,7 @@ pub struct PohRecorder { start_tick_height: u64, // first tick_height this recorder will observe tick_cache: Vec<(Entry, u64)>, // cache of entry and its tick_height working_bank: Option, - sender: Sender, + working_bank_sender: Sender, poh_timing_point_sender: Option, leader_first_tick_height_including_grace_ticks: Option, leader_last_tick_height: u64, // zero if none @@ -776,7 +776,7 @@ impl PohRecorder { for tick in &self.tick_cache[..entry_count] { working_bank.bank.register_tick(&tick.0.hash); - send_result = self.sender.send((working_bank.bank.clone(), tick.clone())); + send_result = self.working_bank_sender.send((working_bank.bank.clone(), tick.clone())); if send_result.is_err() { break; } @@ -988,7 +988,7 @@ impl PohRecorder { transactions, }; let bank_clone = working_bank.bank.clone(); - self.sender.send((bank_clone, (entry, self.tick_height))) + self.working_bank_sender.send((bank_clone, (entry, self.tick_height))) }); self.send_entry_us += send_entry_us; send_entry_res?; @@ -1034,7 +1034,7 @@ impl PohRecorder { ticks_per_slot, poh_config.target_tick_duration.as_nanos() as u64, ); - let (sender, receiver) = unbounded(); + let (working_bank_sender, working_bank_receiver) = unbounded(); let (record_sender, record_receiver) = unbounded(); let (leader_first_tick_height_including_grace_ticks, leader_last_tick_height, grace_ticks) = Self::compute_leader_slot_tick_heights(next_leader_slot, ticks_per_slot); @@ -1044,7 +1044,7 @@ impl PohRecorder { tick_height, tick_cache: vec![], working_bank: None, - sender, + working_bank_sender, poh_timing_point_sender, clear_bank_signal, start_bank, @@ -1073,7 +1073,7 @@ impl PohRecorder { last_reported_slot_for_pending_fork: Arc::default(), is_exited, }, - receiver, + working_bank_receiver, record_receiver, ) }