[bug] ProcessState compute_modified_fields compare hashes instead of ciphers
This commit is contained in:
parent
9c52241e90
commit
66b6ca90c5
@ -32,7 +32,7 @@ impl ProcessState {
|
||||
}
|
||||
|
||||
fn compute_modified_fields(&self, previous_state: Option<&ProcessState>) -> Vec<String> {
|
||||
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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user