Make these methods available only in test mode.

This commit is contained in:
Sean Bowe 2016-09-16 15:32:56 -06:00
parent 7bbd385fbf
commit 84cee5476d
No known key found for this signature in database
GPG Key ID: 95684257D8F8B031
1 changed files with 3 additions and 0 deletions

View File

@ -198,6 +198,7 @@ impl PrivateKey {
/// Construct a "blank" private key for accumulating
/// in tests.
#[cfg(test)]
pub fn new_blank() -> PrivateKey {
PrivateKey {
tau: Fr::one(),
@ -211,6 +212,7 @@ impl PrivateKey {
}
}
#[cfg(test)]
pub fn multiply(&mut self, other: &Self) {
self.tau = self.tau * other.tau;
self.alpha_a = self.alpha_a * other.alpha_a;
@ -223,6 +225,7 @@ impl PrivateKey {
}
#[cfg(feature = "snark")]
#[cfg(test)]
pub fn libsnark_keypair(&self, cs: &CS) -> Keypair {
Keypair::generate(
cs,