From 975f87f5b7a6437d932210790d52a639b5f6ca4e Mon Sep 17 00:00:00 2001 From: Leo-Besancon Date: Thu, 19 Dec 2024 18:22:30 +0100 Subject: [PATCH] Rename + add info!() on cache reset --- massa-execution-worker/src/execution.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/massa-execution-worker/src/execution.rs b/massa-execution-worker/src/execution.rs index c6b7760807..2f59093083 100644 --- a/massa-execution-worker/src/execution.rs +++ b/massa-execution-worker/src/execution.rs @@ -189,7 +189,7 @@ 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(), @@ -197,8 +197,8 @@ impl ExecutionState { 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( @@ -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; }