From 2788159c4d94136d58e357170cf4ca06c72fca85 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Mon, 2 Dec 2024 10:05:15 +0100 Subject: [PATCH] [bug] comment out roles check --- src/commit.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/commit.rs b/src/commit.rs index 07655b9..8ffd964 100644 --- a/src/commit.rs +++ b/src/commit.rs @@ -57,11 +57,12 @@ fn handle_initial_transaction(tx: Transaction, commit_msg: &CommitMessage) -> Re // Process roles and commitments let roles_only_map = json!({ "roles": serde_json::to_value(&commit_msg.roles)? }); - let roles_commitment = roles_only_map.hash_fields(root_commitment)?; + // let roles_commitment = roles_only_map.hash_fields(root_commitment)?; - if roles_commitment.get("roles") != commit_msg.pcd_commitment.get("roles") { - return Err(Error::msg("Role commitment mismatch")); - } + // TODO make that kind of check reliable, needs more work on json serialization + // if roles_commitment.get("roles") != commit_msg.pcd_commitment.get("roles") { + // return Err(Error::msg("Role commitment mismatch")); + // } // Create the initial process state let empty_state = ProcessState {