Skip to content

Commit

Permalink
Backport #500 to v1.17 (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalu committed Dec 15, 2023
1 parent df30b62 commit a1991d6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 6 additions & 0 deletions core/src/bundle_stage/bundle_consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,10 @@ impl BundleConsumer {
let (freeze_lock, freeze_lock_us) = measure_us!(bank_start.working_bank.freeze_lock());
execute_and_commit_timings.freeze_lock_us = freeze_lock_us;

let (last_blockhash, lamports_per_signature) = bank_start
.working_bank
.last_blockhash_and_lamports_per_signature();

let (
RecordTransactionsSummary {
result: record_transactions_result,
Expand Down Expand Up @@ -724,6 +728,8 @@ impl BundleConsumer {
// note: execute_and_commit_timings.commit_us handled inside this function
let (commit_us, commit_bundle_details) = committer.commit_bundle(
&mut bundle_execution_results,
last_blockhash,
lamports_per_signature,
starting_transaction_index,
&bank_start.working_bank,
&mut execute_and_commit_timings,
Expand Down
7 changes: 3 additions & 4 deletions core/src/bundle_stage/committer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use {
bank_utils,
prioritization_fee_cache::PrioritizationFeeCache,
},
solana_sdk::{saturating_add_assign, transaction::SanitizedTransaction},
solana_sdk::{hash::Hash, saturating_add_assign, transaction::SanitizedTransaction},
solana_transaction_status::{
token_balances::{TransactionTokenBalances, TransactionTokenBalancesSet},
PreBalanceInfo,
Expand Down Expand Up @@ -56,13 +56,12 @@ impl Committer {
pub(crate) fn commit_bundle<'a>(
&self,
bundle_execution_output: &'a mut LoadAndExecuteBundleOutput<'a>,
last_blockhash: Hash,
lamports_per_signature: u64,
mut starting_transaction_index: Option<usize>,
bank: &Arc<Bank>,
execute_and_commit_timings: &mut LeaderExecuteAndCommitTimings,
) -> (u64, CommitBundleDetails) {
let (last_blockhash, lamports_per_signature) =
bank.last_blockhash_and_lamports_per_signature();

let transaction_output = bundle_execution_output.bundle_transaction_results_mut();

let (commit_transaction_details, commit_times): (Vec<_>, Vec<_>) = transaction_output
Expand Down
6 changes: 3 additions & 3 deletions programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a1991d6

Please sign in to comment.