Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
remove redundant sanitized_txs param
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Jan 27, 2023
1 parent 4a95419 commit 1ba5b28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 1 addition & 3 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,13 +988,11 @@ impl BankingStage {
};
}

let sanitized_txs = batch.sanitized_transactions();
let (commit_time_us, commit_transaction_statuses) = if executed_transactions_count != 0 {
Committer::commit_transactions(
batch,
&mut loaded_transactions,
execution_results,
sanitized_txs,
starting_transaction_index,
bank,
&mut pre_balance_info,
Expand All @@ -1021,7 +1019,7 @@ impl BankingStage {
load_execute_time.as_us(),
record_time.as_us(),
commit_time_us,
sanitized_txs.len(),
batch.sanitized_transactions().len(),
);

debug!(
Expand Down
11 changes: 7 additions & 4 deletions core/src/banking_stage/committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use {
transaction_batch::TransactionBatch,
vote_sender_types::ReplayVoteSender,
},
solana_sdk::{saturating_add_assign, transaction::SanitizedTransaction},
solana_sdk::saturating_add_assign,
solana_transaction_status::token_balances::TransactionTokenBalancesSet,
std::sync::Arc,
};
Expand All @@ -34,7 +34,6 @@ impl Committer {
batch: &TransactionBatch,
loaded_transactions: &mut [TransactionLoadResult],
execution_results: Vec<TransactionExecutionResult>,
sanitized_txs: &[SanitizedTransaction],
starting_transaction_index: Option<usize>,
bank: &Arc<Bank>,
pre_balance_info: &mut PreBalanceInfo,
Expand All @@ -55,7 +54,7 @@ impl Committer {
bank.last_blockhash_and_lamports_per_signature();

let (tx_results, commit_time_us) = measure_us!(bank.commit_transactions(
sanitized_txs,
batch.sanitized_transactions(),
loaded_transactions,
execution_results,
last_blockhash,
Expand Down Expand Up @@ -84,7 +83,11 @@ impl Committer {
.collect();

let (_, find_and_send_votes_us) = measure_us!({
bank_utils::find_and_send_votes(sanitized_txs, &tx_results, Some(replay_vote_sender));
bank_utils::find_and_send_votes(
batch.sanitized_transactions(),
&tx_results,
Some(replay_vote_sender),
);
Self::collect_balances_and_send_status_batch(
transaction_status_sender,
tx_results,
Expand Down

0 comments on commit 1ba5b28

Please sign in to comment.