diff --git a/vm/src/hint_processor/cairo_1_hint_processor/hint_processor.rs b/vm/src/hint_processor/cairo_1_hint_processor/hint_processor.rs index 5657295b93..5f68c9d1e1 100644 --- a/vm/src/hint_processor/cairo_1_hint_processor/hint_processor.rs +++ b/vm/src/hint_processor/cairo_1_hint_processor/hint_processor.rs @@ -390,10 +390,11 @@ impl Cairo1HintProcessor { let dict_manager_exec_scope = exec_scopes.get_mut_ref::("dict_manager_exec_scope")?; - // The hint is only for dictionary finalization, so can be called. let dict_infos_index = dict_manager_exec_scope.get_dict_infos_index(dict_address)?; vm.insert_value(cell_ref_to_relocatable(dict_index, vm)?, dict_infos_index) - .map_err(HintError::from) + .map_err(HintError::from)?; + // The hint is only for dictionary finalization, so can be called. + dict_manager_exec_scope.finalize_segment(vm, dict_address) } #[allow(clippy::too_many_arguments)] @@ -949,9 +950,6 @@ impl Cairo1HintProcessor { HintError::CustomHint("No current key".to_string().into_boxed_str()) })?, )?; - exec_scopes - .get_mut_ref::("dict_manager_exec_scope")? - .finalize_segment(vm, (dict_accesses_address + (n_accesses * 3))?) } fn alloc_constant_size(