From 8643523e0e9085c7ca06d5e5a4f830e35b3db40e Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 24 Jun 2025 17:25:13 +0200 Subject: [PATCH] [fix me] comment out broken duplicate check on update_process --- src/api.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/api.rs b/src/api.rs index 56955af..938147c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1257,18 +1257,19 @@ pub fn update_process( roles.clone() )?; - // We compare the new state with the previous one - let last_state_merkle_root = &prev_state.state_id; + // TODO duplicate check is broken + // // We compare the new state with the previous one + // let last_state_merkle_root = &prev_state.state_id; - if *last_state_merkle_root == new_state.state_id { - return Err(ApiError::new("new proposed state is identical to the previous commited state".to_owned())); - } + // if *last_state_merkle_root == new_state.state_id { + // return Err(ApiError::new("new proposed state is identical to the previous commited state".to_owned())); + // } - // We check that we don't have already a similar concurrent state - let concurrent_processes = process.get_latest_concurrent_states()?; - if concurrent_processes.iter().any(|p| p.state_id == new_state.state_id) { - return Err(ApiError::new("New state already known".to_owned())); - } + // // We check that we don't have already a similar concurrent state + // let concurrent_processes = process.get_latest_concurrent_states()?; + // if concurrent_processes.iter().any(|p| p.state_id == new_state.state_id) { + // return Err(ApiError::new("New state already known".to_owned())); + // } let diffs = create_diffs(&lock_local_device()?, &process, &new_state, &members_list)?;