Skip to content

Commit

Permalink
Test missing programs were loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolana committed Jul 23, 2024
1 parent 53e7461 commit 1800665
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion svm/src/transaction_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ impl<FG: ForkGraph> TransactionBatchProcessor<FG> {
})
.collect();

let mut loaded_programs_for_txs = None;
let mut loaded_programs_for_txs: Option<ProgramCacheForTxBatch> = None;
loop {
let (program_to_store, task_cookie, task_waiter) = {
// Lock the global cache.
Expand Down Expand Up @@ -1345,6 +1345,7 @@ mod tests {
limit_to_load_programs,
);
assert!(!result.hit_max_limit);
assert!(result.loaded_missing);
let program = result.find(&key).unwrap();
assert!(matches!(
program.program,
Expand Down Expand Up @@ -1877,6 +1878,7 @@ mod tests {
thread::spawn(move || {
let result =
processor.replenish_program_cache(&local_bank, &maps, false, true);
assert!(result.loaded_missing);
for key in &programs {
let cache_entry = result.find(key);
assert!(matches!(
Expand Down

0 comments on commit 1800665

Please sign in to comment.