Skip to content

Commit

Permalink
Prefix sender and receiver with working_bank
Browse files Browse the repository at this point in the history
`sender` and `receiver` are a bit generic and reduces readability.
  • Loading branch information
ksolana committed Jan 16, 2025
1 parent 70ab5e8 commit b3f71d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions poh/src/poh_recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<WorkingBank>,
sender: Sender<WorkingBankEntry>,
working_bank_sender: Sender<WorkingBankEntry>,
poh_timing_point_sender: Option<PohTimingSender>,
leader_first_tick_height_including_grace_ticks: Option<u64>,
leader_last_tick_height: u64, // zero if none
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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?;
Expand Down Expand Up @@ -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);
Expand All @@ -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,
Expand Down Expand Up @@ -1073,7 +1073,7 @@ impl PohRecorder {
last_reported_slot_for_pending_fork: Arc::default(),
is_exited,
},
receiver,
working_bank_receiver,
record_receiver,
)
}
Expand Down

0 comments on commit b3f71d0

Please sign in to comment.