Skip to content

Commit

Permalink
only initialize in-memory state when starting the worker (#3213)
Browse files Browse the repository at this point in the history
  • Loading branch information
silva-fj authored Dec 31, 2024
1 parent 96a2716 commit 1f9fe5a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tee-worker/identity/service/src/main_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ pub(crate) fn main() {
enclave_metrics_receiver,
)));

// init in-memory store, it should be done after the o-call bridge is initialized
if let Err(e) = enclave.init_in_memory_state() {
error!("Failed to initialize in-memory state: {:?}", e);
}

#[cfg(feature = "dcap")]
let quoting_enclave_target_info = match enclave.qe_get_target_info() {
Ok(target_info) => Some(target_info),
Expand All @@ -190,6 +185,11 @@ pub(crate) fn main() {
let quote_size = None;

if let Some(run_config) = config.run_config() {
// init in-memory store, it should be done after the o-call bridge is initialized
if let Err(e) = enclave.init_in_memory_state() {
error!("Failed to initialize in-memory state: {:?}", e);
}

let shard = extract_shard(run_config.shard(), enclave.as_ref());

info!("Worker Config: {:?}", config);
Expand Down

0 comments on commit 1f9fe5a

Please sign in to comment.