Skip to content

Commit

Permalink
remove remainder of single-threaded feat
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardkulms committed Apr 15, 2024
1 parent 6e2e23c commit f69cf54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions zk-token-sdk/src/encryption/discrete_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#![cfg(not(target_os = "solana"))]

#[cfg(feature = "enable-threaded")]
use std::thread;
use {
crate::RISTRETTO_POINT_LEN,
curve25519_dalek::{
Expand All @@ -26,7 +28,7 @@ use {
},
itertools::Itertools,
serde::{Deserialize, Serialize},
std::{collections::HashMap, thread},
std::collections::HashMap,
thiserror::Error,
};

Expand Down Expand Up @@ -284,12 +286,12 @@ mod tests {

assert_eq!(amount, decoded.unwrap());

println!("single thread discrete log computation secs: {computation_secs:?} sec");
println!("no threads discrete log computation secs: {computation_secs:?} sec");
}

#[test]
#[cfg(feature = "single-threaded")]
fn test_decode_correctness_single_threaded_feat() {
#[cfg(not(feature = "enable-threaded"))]
fn test_decode_correctness_no_threads_feat() {
// general case
let amount: u64 = 4294967295;

Expand Down
1 change: 1 addition & 0 deletions zk-token-sdk/src/encryption/elgamal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ mod tests {
}

#[test]
#[cfg(feature = "enable-threaded")]
fn test_encrypt_decrypt_correctness_multithreaded() {
let ElGamalKeypair { public, secret } = ElGamalKeypair::new_rand();
let amount: u32 = 57;
Expand Down

0 comments on commit f69cf54

Please sign in to comment.