Skip to content

Commit

Permalink
docs(network code example): send raw fragment to node
Browse files Browse the repository at this point in the history
toy network client for sending raw vote fragments
  • Loading branch information
cong-or committed Nov 18, 2023
1 parent cbed21d commit a7e6eb0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sign/src/fragment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ mod tests {
// vote
let vote = chain_vote::Vote::new(2, 1 as usize).unwrap();

let crs = chain_vote::Crs::from_hash(vote_plan_id.as_bytes());
let crs = chain_vote::Crs::from_hash(&hex::decode(vote_plan_id.as_bytes()).unwrap());

let (ciphertexts, proof) = ek.encrypt_and_prove_vote(&mut rng, &crs, vote);
let (proof, encrypted_vote) =
Expand Down
2 changes: 1 addition & 1 deletion src/sign/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ mod tests {
// vote
let vote = chain_vote::Vote::new(2, 1_usize).unwrap();

let crs = chain_vote::Crs::from_hash(vote_plan_id.as_bytes());
let crs = chain_vote::Crs::from_hash(&hex::decode(vote_plan_id.as_bytes()).unwrap());

let (ciphertexts, proof) = ek.encrypt_and_prove_vote(&mut rng, &crs, vote);
let (proof, encrypted_vote) =
Expand Down

0 comments on commit a7e6eb0

Please sign in to comment.