test-validator: Always use overridden compute budget in bank (#25128)
This commit is contained in:
parent
766e361111
commit
542a14d9b7
|
@ -4372,15 +4372,16 @@ impl Bank {
|
|||
feature_set_clone_time.as_us()
|
||||
);
|
||||
|
||||
let compute_budget = if let Some(compute_budget) = self.compute_budget {
|
||||
compute_budget
|
||||
} else {
|
||||
let tx_wide_compute_cap = feature_set.is_active(&tx_wide_compute_cap::id());
|
||||
let compute_budget_max_units = if tx_wide_compute_cap {
|
||||
compute_budget::MAX_UNITS
|
||||
} else {
|
||||
compute_budget::DEFAULT_UNITS
|
||||
};
|
||||
let mut compute_budget = self
|
||||
.compute_budget
|
||||
.unwrap_or_else(|| ComputeBudget::new(compute_budget_max_units));
|
||||
let mut compute_budget = ComputeBudget::new(compute_budget_max_units);
|
||||
if tx_wide_compute_cap {
|
||||
let mut compute_budget_process_transaction_time =
|
||||
Measure::start("compute_budget_process_transaction_time");
|
||||
|
@ -4400,6 +4401,8 @@ impl Bank {
|
|||
return TransactionExecutionResult::NotExecuted(err);
|
||||
}
|
||||
}
|
||||
compute_budget
|
||||
};
|
||||
|
||||
self.execute_loaded_transaction(
|
||||
tx,
|
||||
|
|
Loading…
Reference in New Issue