Skip to content

Commit

Permalink
read compute-budget limits directly from RuntimeTransaction static me…
Browse files Browse the repository at this point in the history
…ta (#3736)
  • Loading branch information
tao-stones authored Nov 22, 2024
1 parent 7f00fd3 commit 7647823
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ use {
solana_measure::measure_us,
solana_runtime::{bank::Bank, bank_forks::BankForks},
solana_runtime_transaction::{
instructions_processor::process_compute_budget_instructions,
runtime_transaction::RuntimeTransaction, transaction_with_meta::TransactionWithMeta,
runtime_transaction::RuntimeTransaction, transaction_meta::StaticMeta,
transaction_with_meta::TransactionWithMeta,
},
solana_sdk::{
self,
Expand All @@ -41,7 +41,6 @@ use {
transaction::SanitizedTransaction,
},
solana_svm::transaction_error_metrics::TransactionErrorMetrics,
solana_svm_transaction::svm_message::SVMMessage,
std::{
sync::{Arc, RwLock},
time::{Duration, Instant},
Expand Down Expand Up @@ -552,7 +551,7 @@ impl<T: LikeClusterInfo> SchedulerController<T> {
.is_ok()
})
.filter_map(|(packet, tx, deactivation_slot)| {
process_compute_budget_instructions(SVMMessage::program_instructions_iter(&tx))
tx.compute_budget_limits(&working_bank.feature_set)
.map(|compute_budget| {
(packet, tx, deactivation_slot, compute_budget.into())
})
Expand Down

0 comments on commit 7647823

Please sign in to comment.