From d19abaf653c0b1295cc983e33b7ebaae680d15ee Mon Sep 17 00:00:00 2001 From: Sosthene Date: Tue, 26 Nov 2024 22:04:31 +0100 Subject: [PATCH] [bug] ProcessState compute_modified_fields compare hashes instead of ciphers --- src/process.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/process.rs b/src/process.rs index a322252..38bdafa 100644 --- a/src/process.rs +++ b/src/process.rs @@ -32,7 +32,7 @@ impl ProcessState { } fn compute_modified_fields(&self, previous_state: Option<&ProcessState>) -> Vec { - let new_state = &self.encrypted_pcd; + let new_state = &self.pcd_commitment; // Ensure the new state is a JSON object let new_state_obj = new_state @@ -42,7 +42,7 @@ impl ProcessState { if let Some(prev_state) = previous_state { // Previous state exists; compute differences let previous_state_obj = prev_state - .encrypted_pcd + .pcd_commitment .as_object() .expect("Previous state should be a JSON object"); @@ -288,7 +288,6 @@ impl Process { let mut previous_commited_in = OutPoint::null(); // We iterate backwards until we find a state that has a different commited_in for state in self.states.iter().rev() { - log::debug!("state: {:#?}", state); if previous_commited_in == OutPoint::null() { previous_commited_in = state.commited_in; } else if previous_commited_in != state.commited_in {