Skip to content

Commit

Permalink
Merge pull request #47 from worldcoin/0xkitsune/inclusion-proof
Browse files Browse the repository at this point in the history
Remove unused `message` field from `InclusionProof`
  • Loading branch information
0xKitsune authored Nov 29, 2023
2 parents aa748b7 + 05ade02 commit fb57a2c
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/tree/tree_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ impl TreeData {
return Some(InclusionProof::new(
root,
Self::proof(&tree, identity)?,
None,
));
} else {
let tree_history = self.tree_history.read().await;
Expand All @@ -134,7 +133,6 @@ impl TreeData {
return Some(InclusionProof::new(
root,
Self::proof(prev_tree, identity)?,
None,
));
}
}
Expand All @@ -154,7 +152,6 @@ impl TreeData {
Some(InclusionProof::new(
latest_root,
Self::proof(&tree, identity)?,
None,
))
}
}
Expand Down Expand Up @@ -182,20 +179,11 @@ pub struct InclusionProof {
//TODO: Open a PR to semaphore-rs to deserialize proof instead of implementing deserialization here
#[serde(deserialize_with = "deserialize_proof")]
pub proof: Proof,
pub message: Option<String>,
}

impl InclusionProof {
pub fn new(
root: Field,
proof: Proof,
message: Option<String>,
) -> InclusionProof {
Self {
root,
proof,
message,
}
pub fn new(root: Field, proof: Proof) -> InclusionProof {
Self { root, proof }
}
}

Expand Down

0 comments on commit fb57a2c

Please sign in to comment.