Skip to content

Commit

Permalink
Replace unbounded with bounded as single channel is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolana committed Aug 17, 2024
1 parent f9316f8 commit 92cc4f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions poh/src/poh_recorder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
use solana_ledger::genesis_utils::{create_genesis_config, GenesisConfigInfo};
use {
crate::{leader_bank_notifier::LeaderBankNotifier, poh_service::PohService},
crossbeam_channel::{unbounded, Receiver, RecvTimeoutError, SendError, Sender, TrySendError},
crossbeam_channel::{
bounded, unbounded, Receiver, RecvTimeoutError, SendError, Sender, TrySendError,
},
log::*,
solana_entry::{
entry::{hash_transactions, Entry},
Expand Down Expand Up @@ -207,7 +209,7 @@ impl TransactionRecorder {
transactions: Vec<VersionedTransaction>,
) -> Result<Option<usize>> {
// create a new channel so that there is only 1 sender and when it goes out of scope, the receiver fails
let (result_sender, result_receiver) = unbounded();
let (result_sender, result_receiver) = bounded(1);
let res =
self.record_sender
.send(Record::new(mixin, transactions, bank_slot, result_sender));
Expand Down

0 comments on commit 92cc4f0

Please sign in to comment.