Skip to content

Commit

Permalink
[comments] Added a comment about num_modules > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemitenkov committed Nov 13, 2024
1 parent d7c7105 commit cdc6ef3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aptos-move/aptos-vm/src/block_executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,9 @@ impl BlockAptosVM {
(environment, Arc::new(GlobalModuleCache::empty()))
};

// Finally, to avoid cold starts, fetch the framework code prior to block execution.
// Finally, to avoid cold starts, fetch the framework code prior to block execution. This
// ensures the state with 0 modules cached is not possible for block execution (as long as
// the config enables the framework prefetch).
if is_loader_v2_enabled
&& module_cache.num_modules() == 0
&& config.local.module_cache_config.prefetch_framework_code
Expand Down

0 comments on commit cdc6ef3

Please sign in to comment.