Skip to content

Commit

Permalink
Rename + add info!() on cache reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Besancon committed Dec 19, 2024
1 parent b1c8da3 commit 975f87f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions massa-execution-worker/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,16 @@ impl ExecutionState {
})));

// Create an empty placeholder execution context, with shared atomic access
let unwrapped_execution_context = ExecutionContext::new(
let execution_context = ExecutionContext::new(
config.clone(),
final_state.clone(),
active_history.clone(),
module_cache.clone(),
mip_store.clone(),
execution_trail_hash,
);
let cur_execution_version = unwrapped_execution_context.execution_component_version;
let execution_context = Arc::new(Mutex::new(unwrapped_execution_context));
let cur_execution_version = execution_context.execution_component_version;
let execution_context = Arc::new(Mutex::new(execution_context));

// Instantiate the interface providing ABI access to the VM, share the execution context with it
let execution_interface = Box::new(InterfaceImpl::new(
Expand Down Expand Up @@ -1494,6 +1494,7 @@ impl ExecutionState {
let execution_version = execution_context.execution_component_version;
if self.cur_execution_version != execution_version {
// Reset the cache because a new execution version has become active
info!("A new execution version has become active! Resetting the module-cache.");
self.module_cache.write().reset();
self.cur_execution_version = execution_version;
}
Expand Down

0 comments on commit 975f87f

Please sign in to comment.