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

Remove UnprocessedTransactionStorage::LocalTransactionStorage #3770

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
12 changes: 5 additions & 7 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ use {
leader_slot_metrics::LeaderSlotMetricsTracker,
packet_receiver::PacketReceiver,
qos_service::QosService,
unprocessed_packet_batches::*,
unprocessed_transaction_storage::{ThreadType, UnprocessedTransactionStorage},
unprocessed_transaction_storage::UnprocessedTransactionStorage,
},
crate::{
banking_stage::{
Expand Down Expand Up @@ -435,8 +434,6 @@ impl BankingStage {
// This thread talks to poh_service and broadcasts the entries once they have been recorded.
// Once an entry has been recorded, its blockhash is registered with the bank.
let data_budget = Arc::new(DataBudget::default());
let batch_limit =
TOTAL_BUFFERED_PACKETS / ((num_threads - NUM_VOTE_PROCESSING_THREADS) as usize);
// Keeps track of extraneous vote transactions for the vote threads
let latest_unprocessed_votes = {
let bank = bank_forks.read().unwrap().working_bank();
Expand Down Expand Up @@ -471,9 +468,10 @@ impl BankingStage {
),
_ => (
non_vote_receiver.clone(),
UnprocessedTransactionStorage::new_transaction_storage(
UnprocessedPacketBatches::with_capacity(batch_limit),
ThreadType::Transactions,
// TODO: Check if this is alright.
UnprocessedTransactionStorage::new_vote_storage(
latest_unprocessed_votes.clone(),
VoteSource::Tpu,
),
),
};
Expand Down
2 changes: 1 addition & 1 deletion core/src/banking_stage/forwarder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ mod tests {
(packet.meta().size, DeserializedPacket::new(packet).unwrap())
};

let mut unprocessed_packet_batches = UnprocessedTransactionStorage::new_transaction_storage(
let mut unprocessed_packet_batches = UnprocessedTransactionStorage::new_vote_storage(
UnprocessedPacketBatches::from_iter(
vec![
forwarded_packet,
Expand Down
Loading
Loading