Use new feature to gate test vectors behind
[rust-lightning] / lightning / src / util / crypto.rs
index d4d15cfa3045a9fb09b4400b12302b9984d5d49f..ac159519c59048ba762384db5bdfa418ce8cb9ec 100644 (file)
@@ -62,7 +62,9 @@ pub fn sign_with_aux_rand<C: Signing, ES: Deref>(
                        break sig;
                }
        };
-       #[cfg(not(feature = "grind_signatures"))]
+       #[cfg(all(not(feature = "grind_signatures"), not(feature = "_test_vectors")))]
        let sig = ctx.sign_ecdsa_with_noncedata(msg, sk, &entropy_source.get_secure_random_bytes());
+       #[cfg(all(not(feature = "grind_signatures"), feature = "_test_vectors"))]
+       let sig = sign(ctx, msg, sk);
        sig
 }