Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace unbounded with bounded as single channel is used #2646

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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